зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f642124f4b
Коммит
f4ebf1682f
|
@ -806,7 +806,15 @@ Layer::ComputeEffectiveTransformForMaskLayer(const Matrix4x4& aTransformToSurfac
|
||||||
bool maskIs2D = mMaskLayer->GetTransform().CanDraw2D();
|
bool maskIs2D = mMaskLayer->GetTransform().CanDraw2D();
|
||||||
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
|
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
|
||||||
#endif
|
#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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче