Bug 69850 - Enable out-of-thread compositing in WebKit compositor API
Summary: Enable out-of-thread compositing in WebKit compositor API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 10:44 PDT by Antoine Labour
Modified: 2011-10-18 15:36 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.00 KB, patch)
2011-10-11 10:45 PDT, Antoine Labour
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Labour 2011-10-11 10:44:59 PDT
Enable out-of-thread compositing in WebKit compositor API
Comment 1 Antoine Labour 2011-10-11 10:45:21 PDT
Created attachment 110536 [details]
Patch
Comment 2 Antoine Labour 2011-10-11 10:46:25 PDT
It needs https://bugs.webkit.org/show_bug.cgi?id=69048 to work correctly if the client thread is not the main thread.
Comment 3 Antoine Labour 2011-10-12 12:55:30 PDT
Ping ?
Comment 4 James Robinson 2011-10-12 13:46:36 PDT
I don't understand this patch.  Why would users of the WK API want to use the threaded path?
Comment 5 Nat Duca 2011-10-12 14:16:10 PDT
(In reply to comment #4)
> I don't understand this patch.  Why would users of the WK API want to use the threaded path?

This makes sense to me. This reduces complexity --- either thread is in use or its not. Rather than "oh, its in use by the renderer compositor but if you're talking about the browser compositor, well thats a different story." Sorry, but ew.
Comment 6 Antoine Labour 2011-10-12 14:28:00 PDT
We're already seeing the browser UI thread limited by painting in certain conditions. We could gain parallelism by moving the rendering to a separate thread.
We'll also want to be able to drive animations from the compositor thread.

Also, it works. So why not?
Comment 7 James Robinson 2011-10-12 14:51:32 PDT
All valid points - I just wasn't really sure what the goal was.  I agree being able to do animations, etc will be pretty sweet once we get that rolling.
Comment 8 James Robinson 2011-10-12 14:54:51 PDT
Comment on attachment 110536 [details]
Patch

R=me but there's still something a bit amiss here.  Right now there are 2 ways to indicate threading support via the WK API - you can set the appropriate CCSettings value and call WebCompositor::setThread(). If you do the former but not the latter you hit ASSERT()s and crash today.  I think we want to just make the latter be the control - if you pass a thread to WebCompositor::setThread() then the compositor uses it, otherwise it runs single-threaded.

Does that sound like a good plan going forward, Nat?  To be clear I think this patch is fine to land - we can clean things up later.
Comment 9 WebKit Review Bot 2011-10-13 15:45:32 PDT
Comment on attachment 110536 [details]
Patch

Rejecting attachment 110536 [details] from commit-queue.

piman@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.

- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.
Comment 10 Nat Duca 2011-10-18 13:31:28 PDT
Yeah, I like it. Saying back what I heard, its "do away with the CCSettings field for threaded compositing and derive this entirely from whether CCThread was handed a thread."
Comment 11 WebKit Review Bot 2011-10-18 15:36:46 PDT
Comment on attachment 110536 [details]
Patch

Clearing flags on attachment: 110536

Committed r97795: <http://trac.webkit.org/changeset/97795>
Comment 12 WebKit Review Bot 2011-10-18 15:36:51 PDT
All reviewed patches have been landed.  Closing bug.