<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform"
   href="https://bugs.webkit.org/show_bug.cgi?id=151829">151829</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Layout and Rendering
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sabouhallawa&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>simon.fraser&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Saving/Restoring the GraphicsContext is an expensive operation. It should be used when the number to save/restore options in the context is large. But when only one option is set and later is restored, it is a lot cheaper to do that save/restore explicitly.

Here are some results:

When using GraphicsContextStateSaver in RenderLayer::paintLayerByApplyingTransform:

Test Name        Score    Complexity                    FPS    
                    Avg.    W.5%    Std.    %    Avg.    W.5%    Std.    %    

CSS bouncing circles    419.84    444.72    396.34    25.86    5.82    49.53    44.73    2.30    4.65



When removing GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform:

Test Name        Score    Complexity                    FPS    
                    Avg.    W.5%    Std.    %    Avg.    W.5%    Std.    %    

CSS bouncing circles    491.74    532.11    454.44    38.40    7.22    48.66    43.87    2.84    5.83</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>