Bug 1245870: When concluding there is nothing to draw inside the clip be sure to balance the Save() since it won't be balanced in PopGroupForlayer. r=jrmuizel draft
authorBas Schouten <bschouten@mozilla.com>
Thu, 04 Feb 2016 23:37:04 +0100
changeset 329031 64441cce95e55c73141240099a67bf93917ff3ce
parent 329021 979832bbcc99be69471b316713ec1a8ba3c55fb1
child 513891 d9d85edf522d51bec2234ad3286278262236f149
push id10450
push userbschouten@mozilla.com
push dateThu, 04 Feb 2016 22:37:27 +0000
reviewersjrmuizel
bugs1245870
milestone47.0a1
Bug 1245870: When concluding there is nothing to draw inside the clip be sure to balance the Save() since it won't be balanced in PopGroupForlayer. r=jrmuizel
gfx/layers/basic/BasicLayerManager.cpp
--- a/gfx/layers/basic/BasicLayerManager.cpp
+++ b/gfx/layers/basic/BasicLayerManager.cpp
@@ -118,16 +118,17 @@ BasicLayerManager::PushGroupForLayer(gfx
       ctx->SetMatrix(oldMat);
 
       group.mGroupOffset = surfRect.TopLeft();
       group.mGroupTarget = ctx;
 
       group.mMaskSurface = GetMaskForLayer(aLayer, &group.mMaskTransform);
       return group;
     }
+    aContext->Restore();
   }
 
   Matrix maskTransform;
   RefPtr<SourceSurface> maskSurf = GetMaskForLayer(aLayer, &maskTransform);
 
   if (maskSurf) {
     // The returned transform will transform the mask to device space on the
     // destination. Since the User->Device space transform will be applied