Bug 1067286 - Part 1: Correct application of device offset for mask layers. r=mattwoodrow

- Fixed GetMaskData() function in BasicLayersImpl.cpp to use
  Matrix::PostTranslate rather than Matrix::PreTranslate when applying
  the device offset.
This commit is contained in:
Kearwood (Kip) Gilbert
2014-12-03 18:02:00 -05:00
parent a352503855
commit 9913f5b14c

View File

@@ -31,7 +31,7 @@ GetMaskData(Layer* aMaskLayer,
Matrix4x4 effectiveTransform = aMaskLayer->GetEffectiveTransform();
DebugOnly<bool> maskIs2D = effectiveTransform.CanDraw2D(&transform);
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
transform.PreTranslate(-aDeviceOffset.x, -aDeviceOffset.y);
transform.PostTranslate(-aDeviceOffset.x, -aDeviceOffset.y);
aMaskData->Construct(transform, surface);
return true;
}