Changeset 193390 in webkit


Ignore:
Timestamp:
Dec 3, 2015 4:49:48 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
https://bugs.webkit.org/show_bug.cgi?id=151829

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-12-03
Reviewed by Simon Fraser.

Set the CTM of the GraphicsContext to its original value before changing
it. This is a lot cheaper than using GraphicsContextStateSaver to save the
whole state of the GraphicsContext and restore it back;

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayerByApplyingTransform):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r193389 r193390  
     12015-12-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
     4        https://bugs.webkit.org/show_bug.cgi?id=151829
     5
     6        Reviewed by Simon Fraser.
     7
     8        Set the CTM of the GraphicsContext to its original value before changing
     9        it. This is a lot cheaper than using GraphicsContextStateSaver to save the
     10        whole state of the GraphicsContext and restore it back;
     11
     12        * rendering/RenderLayer.cpp:
     13        (WebCore::RenderLayer::paintLayerByApplyingTransform):
     14
    1152015-12-03  Eric Carlson  <eric.carlson@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r192900 r193390  
    44064406    transform.translateRight(devicePixelSnappedOffsetForThisLayer.width(), devicePixelSnappedOffsetForThisLayer.height());
    44074407    // Apply the transform.
    4408     GraphicsContextStateSaver stateSaver(context);
     4408    AffineTransform oldTransfrom = context.getCTM();
    44094409    context.concatCTM(transform.toAffineTransform());
    44104410
     
    44144414        paintingInfo.paintBehavior, adjustedSubpixelAccumulation, paintingInfo.subtreePaintRoot, paintingInfo.overlapTestRequests);
    44154415    paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags);
     4416    context.setCTM(oldTransfrom);
    44164417}
    44174418
Note: See TracChangeset for help on using the changeset viewer.