[webkit-reviews] review canceled: [Bug 56131] [chromium] Compositor thread infrastructure : [Attachment 87683] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 31 02:45:43 PDT 2011


Nat Duca <nduca at chromium.org> has canceled Nat Duca <nduca at chromium.org>'s
request for review:
Bug 56131: [chromium] Compositor thread infrastructure
https://bugs.webkit.org/show_bug.cgi?id=56131

Attachment 87683: Patch
https://bugs.webkit.org/attachment.cgi?id=87683&action=review

------- Additional Comments from Nat Duca <nduca at chromium.org>
This architecture of this patch is getting closer to something I like. I'm 85%
sure I'll be breaking this up into a few bugs: an thread infrastructure + unit
tests, and subsequent implementations of the commit algorithm.

So, this is largely a checkpoint, to get feedback on the new approach before I
start breaking into the infrastructure commits and everything else.

At a high level:
1. The Messaging between threads is built on, which is just a class with a
run().

2. On top of this, we add CCRunnableMethods, which are similar to Chrome's
NewRunnableMethod system. These are method pointers with bound arguments, and
derive from CCTask. This lets you call a method on a class without as much
fuss.

3a. CCViewManager and CCViewManagerImpl manage the collection of active views
for the main and impl thread respectively. These classes have
callAsyncOImpl/Main functions that allow you to call methods on the other side
of the fence. This is used for managing the view->viewImpl correspondences.
This is built on the task system and RunnableMethods.

3b. We prevent accidental access of the impl pointer on the main thread using
the CCNonThreadSafeMember<T>.

4. CCView and CCViewImpl have a callAsyncOnMain/Impl functions that call a
method on the other side of the fence. These two functions become the workhorse
for the commit algorithm.

5. The commit algorithm is implemented entirely in CCView and CCViewImpl and
should be pretty easy to read. Compared to the previous patch:
5a. We now can trigger a redraw without a commit
5b. drawing is initiated on the impl thread, but then we perfom a blocking call
to the MainThread to do the actual draw.

That should be it.


More information about the webkit-reviews mailing list