mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1145730 - Restrict the async transforms applied to mask layers to those caused by fixed-position adjustment. r=kats
This commit is contained in:
parent
75feab8792
commit
89ca0457b5
@ -840,14 +840,10 @@ Layer::ComputeEffectiveTransformForMaskLayer(const Matrix4x4& aTransformToSurfac
|
||||
bool maskIs2D = mMaskLayer->GetTransform().CanDraw2D();
|
||||
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
|
||||
#endif
|
||||
// Use our shadow transform and base transform to compute a delta for the
|
||||
// mask layer's effective transform, as though it was also transformed by
|
||||
// the APZ.
|
||||
//
|
||||
// Note: This will fail if the base transform is degenerate. Currently, this
|
||||
// is not expected for OMTA transformed layers.
|
||||
mMaskLayer->mEffectiveTransform = mMaskLayer->GetTransform() *
|
||||
GetTransform().Inverse() * GetLocalTransform() *
|
||||
// The mask layer can have an async transform applied to it in some
|
||||
// situations, so be sure to use its GetLocalTransform() rather than
|
||||
// its GetTransform().
|
||||
mMaskLayer->mEffectiveTransform = mMaskLayer->GetLocalTransform() *
|
||||
mMaskLayer->mEffectiveTransform;
|
||||
}
|
||||
}
|
||||
|
@ -197,6 +197,12 @@ TranslateShadowLayer2D(Layer* aLayer,
|
||||
if (aAdjustClipRect) {
|
||||
TransformClipRect(aLayer, Matrix4x4::Translation(aTranslation.x, aTranslation.y, 0));
|
||||
}
|
||||
|
||||
// If a fixed- or sticky-position layer has a mask layer, that mask should
|
||||
// move along with the layer, so apply the translation to the mask layer too.
|
||||
if (Layer* maskLayer = aLayer->GetMaskLayer()) {
|
||||
TranslateShadowLayer2D(maskLayer, aTranslation, false);
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -940,6 +940,10 @@ CompositorParent::CompositeCallback(TimeStamp aScheduleTime)
|
||||
/* static */ void
|
||||
CompositorParent::SetShadowProperties(Layer* aLayer)
|
||||
{
|
||||
if (Layer* maskLayer = aLayer->GetMaskLayer()) {
|
||||
SetShadowProperties(maskLayer);
|
||||
}
|
||||
|
||||
// FIXME: Bug 717688 -- Do these updates in LayerTransactionParent::RecvUpdate.
|
||||
LayerComposite* layerComposite = aLayer->AsLayerComposite();
|
||||
// Set the layerComposite's base transform to the layer's base transform.
|
||||
|
Loading…
Reference in New Issue
Block a user