Bug 1067286 - Part 1: Correct application of device offset for mask layers. r=mattwoodrow
authorKearwood (Kip) Gilbert <kgilbert@mozilla.com>
Wed, 03 Dec 2014 18:02:00 -0500
changeset 248072 698f2fe16af5ae7b71f680c0fd32c50526332b6a
parent 248071 25436150600c2de2c0ae52a37b873fcfbd28cd66
child 248073 c5075104363d7a8299868a9bcd7ba51325fbcba9
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1067286
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.
gfx/layers/basic/BasicLayersImpl.cpp
--- a/gfx/layers/basic/BasicLayersImpl.cpp
+++ b/gfx/layers/basic/BasicLayersImpl.cpp
@@ -26,17 +26,17 @@ GetMaskData(Layer* aMaskLayer,
   if (aMaskLayer) {
     RefPtr<SourceSurface> surface =
       static_cast<BasicImplData*>(aMaskLayer->ImplData())->GetAsSourceSurface();
     if (surface) {
       Matrix transform;
       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;
     }
   }
   return false;
 }
 
 void