Bug 50070 - Don't do GraphicsContext save/restore just to preserve the CompositeOperator
Summary: Don't do GraphicsContext save/restore just to preserve the CompositeOperator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2010-11-25 04:57 PST by Andreas Kling
Modified: 2010-12-10 08:05 PST (History)
4 users (show)

See Also:


Attachments
Proposed patch (14.54 KB, patch)
2010-11-25 05:12 PST, Andreas Kling
eric: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>