[Webkit-unassigned] [Bug 172883] New: REGRESSION(r216212): RenderReplaced::paint() should not save and restore the context unless it has to

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 2 17:05:02 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=172883

            Bug ID: 172883
           Summary: REGRESSION(r216212): RenderReplaced::paint() should
                    not save and restore the context unless it has to
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

The change r216212 made RenderReplaced::paint() saves and restores the context every time it is called. However the context should be saved and restored only if the renderer is dragged and it is painted in a low alpha. Restoring the context is an expensive operation and should be called only when we have to. Actually with the low alpha painting case, we may not need the context to be saved and restored. All we need:

At the beginning of the function:
float alpha = paintInfo.context().alpha();

And before it exits:
paintInfo.context().setAlpha(alpha);

This affects the MotionMark scores.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170603/26536947/attachment.html>


More information about the webkit-unassigned mailing list