Bug 1473041 - save and restore PermitSubpixelAA state for basic layer paint callback. r=mstange
authorLee Salzman <lsalzman@mozilla.com>
Thu, 12 Jul 2018 14:19:07 -0400
changeset 426404 e6698ef51a7e2f049350b09d67fa7338d2bd405a
parent 426403 cb7687c97e1f8ab7e233469823eb89afd8ba6322
child 426405 e52191635ec33dafe40022480dcf9e9e58abd07d
push id34271
push userapavel@mozilla.com
push dateThu, 12 Jul 2018 21:52:15 +0000
treeherdermozilla-central@96c61b1dd0a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1473041
milestone63.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 1473041 - save and restore PermitSubpixelAA state for basic layer paint callback. r=mstange
gfx/layers/basic/BasicPaintedLayer.cpp
--- a/gfx/layers/basic/BasicPaintedLayer.cpp
+++ b/gfx/layers/basic/BasicPaintedLayer.cpp
@@ -85,19 +85,22 @@ BasicPaintedLayer::PaintThebes(gfxContex
             BasicManager()->PushGroupForLayer(aContext, this, toDraw, group);
         if (availableGroup) {
           context = group.mGroupTarget;
         }
       } else {
         context = aContext;
       }
       if (context) {
-        SetAntialiasingFlags(this, context->GetDrawTarget());
+        DrawTarget* target = context->GetDrawTarget();
+        bool oldAA = target->GetPermitSubpixelAA();
+        SetAntialiasingFlags(this, target);
         aCallback(this, context, toDraw, toDraw, DrawRegionClip::NONE,
                   nsIntRegion(), aCallbackData);
+        target->SetPermitSubpixelAA(oldAA);
       }
       if (needsGroup && availableGroup) {
         BasicManager()->PopGroupForLayer(group);
       }
 
       aContext->Restore();
     }