mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1086723 - Enable asynchronous update of mask layer transforms. r=kats
- Layer::ComputeEffectiveTransformForMaskLayer now computes a delta transform for the mask layer's effective transform using the masked layer's shadow transform and base transform. This delta is applied to the effective transform of the mask layer, with the same effect as if it were also transformed by the APZ.
This commit is contained in:
parent
f642124f4b
commit
f4ebf1682f
@ -806,7 +806,15 @@ Layer::ComputeEffectiveTransformForMaskLayer(const Matrix4x4& aTransformToSurfac
|
||||
bool maskIs2D = mMaskLayer->GetTransform().CanDraw2D();
|
||||
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
|
||||
#endif
|
||||
mMaskLayer->mEffectiveTransform = mMaskLayer->GetTransform() * mMaskLayer->mEffectiveTransform;
|
||||
// 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() *
|
||||
mMaskLayer->mEffectiveTransform;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user