Title: [154469] trunk/Source/WebCore
Revision
154469
Author
[email protected]
Date
2013-08-22 17:28:45 -0700 (Thu, 22 Aug 2013)

Log Message

Repaint counters are sometimes not in the corner of the compositing layer
https://bugs.webkit.org/show_bug.cgi?id=120176

Reviewed by Beth Dakin.

Sometimes the repaint counters are not in the corner of the compositing layer;
they are either inset, or partially or entirely outside the layer.

Fix by making sure that we restore the CGContext before drawing
the counter, since the WebCore code may have translated the CTM.

The counter-painting code saves and restores the context itself,
so this is safe.

* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154468 => 154469)


--- trunk/Source/WebCore/ChangeLog	2013-08-23 00:19:54 UTC (rev 154468)
+++ trunk/Source/WebCore/ChangeLog	2013-08-23 00:28:45 UTC (rev 154469)
@@ -1,3 +1,22 @@
+2013-08-22  Simon Fraser  <[email protected]>
+
+        Repaint counters are sometimes not in the corner of the compositing layer
+        https://bugs.webkit.org/show_bug.cgi?id=120176
+
+        Reviewed by Beth Dakin.
+
+        Sometimes the repaint counters are not in the corner of the compositing layer;
+        they are either inset, or partially or entirely outside the layer.
+        
+        Fix by making sure that we restore the CGContext before drawing
+        the counter, since the WebCore code may have translated the CTM.
+        
+        The counter-painting code saves and restores the context itself,
+        so this is safe.
+
+        * platform/graphics/mac/WebLayer.mm:
+        (drawLayerContents):
+
 2013-08-22  Tim Horton  <[email protected]>
 
         Unavailable plug-in indicator text is one pixel too low

Modified: trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm (154468 => 154469)


--- trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm	2013-08-23 00:19:54 UTC (rev 154468)
+++ trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm	2013-08-23 00:28:45 UTC (rev 154469)
@@ -126,6 +126,8 @@
     layerContents = platformLayer->owner();
     ASSERT(layerContents);
 
+    CGContextRestoreGState(context);
+
     // Always update the repain count so that it's accurate even if the count itself is not shown. This will be useful
     // for the Web Inspector feeding this information through the LayerTreeAgent. 
     int repaintCount = layerContents->platformCALayerIncrementRepaintCount();
@@ -166,8 +168,6 @@
         CGContextEndTransparencyLayer(context);
         CGContextRestoreGState(context);
     }
-
-    CGContextRestoreGState(context);
 }
 
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to