Bug 1082530, part 4 - Make BasicColorLayer use the variant of Moz2D's UserToDevicePixelSnapped that honors disabling of pixel snapping and make it ignore scaling in the matrix (restore the pre-bug 989858 beharior). r=mattwoodrow
authorJonathan Watt <jwatt@jwatt.org>
Sun, 19 Oct 2014 10:22:47 +0100
changeset 211054 5f6dc495c8b612631fd91b67f7303e24178f3f15
parent 211053 ce005765cf43f6278a37be50dd2a9dfa0cb150b0
child 211055 1abfecf86c502bf7ca33be585d44f235f7592112
push id50633
push userjwatt@jwatt.org
push dateSun, 19 Oct 2014 09:23:28 +0000
treeherdermozilla-inbound@1abfecf86c50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1082530, 989858
milestone36.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 1082530, part 4 - Make BasicColorLayer use the variant of Moz2D's UserToDevicePixelSnapped that honors disabling of pixel snapping and make it ignore scaling in the matrix (restore the pre-bug 989858 beharior). r=mattwoodrow
gfx/layers/basic/BasicColorLayer.cpp
--- a/gfx/layers/basic/BasicColorLayer.cpp
+++ b/gfx/layers/basic/BasicColorLayer.cpp
@@ -51,21 +51,17 @@ public:
                      const gfx::Point& aDeviceOffset,
                      Layer* aMaskLayer) MOZ_OVERRIDE
   {
     if (IsHidden()) {
       return;
     }
 
     Rect snapped(mBounds.x, mBounds.y, mBounds.width, mBounds.height);
-    if (UserToDevicePixelSnapped(snapped, aDT->GetTransform())) {
-      Matrix mat = aDT->GetTransform();
-      mat.Invert();
-      snapped = mat.TransformBounds(snapped);
-    }
+    MaybeSnapToDevicePixels(snapped, *aDT, true);
 
     // Clip drawing in case we're using (unbounded) operator source.
     aDT->PushClipRect(snapped);
     FillRectWithMask(aDT, aDeviceOffset, snapped, ToColor(mColor),
                      DrawOptions(GetEffectiveOpacity(), GetEffectiveOperator(this)),
                      aMaskLayer);
     aDT->PopClip();
   }