Changeset 154469 in webkit


Ignore:
Timestamp:
Aug 22, 2013 5:28:45 PM (11 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154464 r154469  
     12013-08-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Repaint counters are sometimes not in the corner of the compositing layer
     4        https://bugs.webkit.org/show_bug.cgi?id=120176
     5
     6        Reviewed by Beth Dakin.
     7
     8        Sometimes the repaint counters are not in the corner of the compositing layer;
     9        they are either inset, or partially or entirely outside the layer.
     10       
     11        Fix by making sure that we restore the CGContext before drawing
     12        the counter, since the WebCore code may have translated the CTM.
     13       
     14        The counter-painting code saves and restores the context itself,
     15        so this is safe.
     16
     17        * platform/graphics/mac/WebLayer.mm:
     18        (drawLayerContents):
     19
    1202013-08-22  Tim Horton  <timothy_horton@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm

    r154314 r154469  
    127127    ASSERT(layerContents);
    128128
     129    CGContextRestoreGState(context);
     130
    129131    // Always update the repain count so that it's accurate even if the count itself is not shown. This will be useful
    130132    // for the Web Inspector feeding this information through the LayerTreeAgent.
     
    167169        CGContextRestoreGState(context);
    168170    }
    169 
    170     CGContextRestoreGState(context);
    171171}
    172172
Note: See TracChangeset for help on using the changeset viewer.