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:
Kearwood (Kip) Gilbert 2014-11-14 15:33:00 +01:00
parent f642124f4b
commit f4ebf1682f

View File

@ -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;
}
}