Bug 1473041 - save and restore PermitSubpixelAA state for basic layer paint callback. r=mstange a=lizzard
authorLee Salzman <lsalzman@mozilla.com>
Thu, 12 Jul 2018 14:19:07 -0400
changeset 477959 0f8a467c6c83
parent 477958 fb31b6425bf7
child 477960 4c22770b36ca
push id9475
push userarchaeopteryx@coole-files.de
push date2018-07-13 21:33 +0000
treeherdermozilla-beta@d7ab2f3df084 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, lizzard
bugs1473041
milestone62.0
Bug 1473041 - save and restore PermitSubpixelAA state for basic layer paint callback. r=mstange a=lizzard
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();
     }