Bug 50070

Summary: Don't do GraphicsContext save/restore just to preserve the CompositeOperator
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: rhodovan.u-szeged, simon.fraser, webkit.review.bot, zimmermann
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch eric: review+, webkit.review.bot: commit-queue-

Description Andreas Kling 2010-11-25 04:57:30 PST
We currently put GraphicsContext::save()/restore() pairs around calls to GraphicsContext::setCompositeOperation()
This can be avoided by adding a GraphicsContext::compositeOperation() and simply resetting that after doing some paint operations (that don't taint the context.)
Comment 1 Andreas Kling 2010-11-25 05:12:01 PST
Created attachment 74862 [details]
Proposed patch
Comment 2 Eric Seidel (no email) 2010-12-10 02:40:33 PST
Comment on attachment 74862 [details]
Proposed patch

Seems OK.  Do you notice any real performance increase here?
Comment 3 WebKit Review Bot 2010-12-10 02:45:36 PST
Comment on attachment 74862 [details]
Proposed patch

Rejecting attachment 74862 [details] from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=abarth-cq-sl', 'apply-attachment', '--non-interactive', 74862]" exit_code: 2
Last 500 characters of output:
led to merge in the changes.
Patch failed at 0001 [Qt] Make sure we send the response before any data.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

rebase refs/remotes/origin/master: command returned error: 1

Died at WebKitTools/Scripts/update-webkit line 132.

Failed to run "['WebKitTools/Scripts/update-webkit']" exit_code: 2

Full output: http://queues.webkit.org/results/6889030
Comment 4 Andreas Kling 2010-12-10 02:51:11 PST
(In reply to comment #2)
> (From update of attachment 74862 [details])
> Seems OK.  Do you notice any real performance increase here?

I do for Qt at least (haven't perf-tested other ports), our save/restore operations are very expensive.

Thanks for reviewing :)
Comment 5 Andreas Kling 2010-12-10 03:09:02 PST
(In reply to comment #3)
> (From update of attachment 74862 [details])
> Rejecting attachment 74862 [details] from commit-queue.

I'll land this manually after bug 49914 goes in.
Comment 6 Andreas Kling 2010-12-10 08:05:51 PST
Committed r73729: <http://trac.webkit.org/changeset/73729>