Bug 994282 - Apply mask layer transforms in the correct order. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 24 Apr 2014 19:38:35 +1200
changeset 180243 3be5a3af4e6a4dbfede7f25b588949933c59a288
parent 180242 6ea4ce828d069fa99f3e1526f40eaeb193de17a3
child 180244 c223611fa19ec5a591aa0f22b1b5df4f0c712d94
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersroc
bugs994282
milestone31.0a1
Bug 994282 - Apply mask layer transforms in the correct order. r=roc
gfx/layers/basic/BasicLayersImpl.cpp
--- a/gfx/layers/basic/BasicLayersImpl.cpp
+++ b/gfx/layers/basic/BasicLayersImpl.cpp
@@ -106,17 +106,17 @@ FillRectWithMask(DrawTarget* aDT,
 {
   if (aMaskSource && aMaskTransform) {
     aDT->PushClipRect(aRect);
     Matrix oldTransform = aDT->GetTransform();
 
     Matrix inverseMask = *aMaskTransform;
     inverseMask.Invert();
 
-    Matrix transform = inverseMask * oldTransform;
+    Matrix transform = oldTransform * inverseMask;
     if (aSurfaceTransform) {
       transform = transform * (*aSurfaceTransform);
     }
 
     SurfacePattern source(aSurface, aExtendMode, transform, aFilter);
 
     aDT->SetTransform(*aMaskTransform);
     aDT->MaskSurface(source, aMaskSource, Point(0, 0), aOptions);