RESOLVED FIXED 71381
[chromium] Notify scheduler on SwapBuffers in threaded compositor mode
https://bugs.webkit.org/show_bug.cgi?id=71381
Summary [chromium] Notify scheduler on SwapBuffers in threaded compositor mode
James Robinson
Reported 2011-11-02 11:59:52 PDT
[chromium] Notify scheduler on SwapBuffers in threaded compositor mode
Attachments
Patch (2.83 KB, patch)
2011-11-02 12:00 PDT, James Robinson
no flags
Patch (9.07 KB, patch)
2011-11-02 14:29 PDT, James Robinson
no flags
James Robinson
Comment 1 2011-11-02 12:00:13 PDT
Nat Duca
Comment 2 2011-11-02 12:11:25 PDT
Recapping the verbal conversation, I think if we move the body of drawLayersAndSwap into scheduledActionDraw, then the proxy will never draw except as directed by the scheduler. At that point, we can make CCScheduler::ProcessCommands call FrameRateControll::didBeginFrame right Testing this might require that we make FRC fake-able. :/
James Robinson
Comment 3 2011-11-02 14:29:15 PDT
James Robinson
Comment 4 2011-11-02 14:29:35 PDT
Is this what you had in mind? The magic number '2' is now more of a magic number but I'm not quite sure where to put it.
Nat Duca
Comment 5 2011-11-02 14:41:19 PDT
Comment on attachment 113378 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113378&action=review > Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:510 > + } What about setting this when the frame rate controller in initializeImplOnImplThread, around line 510. Right after the frameRateController creation, just use m_layerTreeHostImpl->layerRendererCapabilities(). My [informal] goal would be that the CCScheduler doesn't ever have to know how the FrameRateController is configured. Alternatively, if you're concerned about context-lost case, you could add a frameRateController() accessor on CCScheduler, and then grab it and configure it directly.
James Robinson
Comment 6 2011-11-03 15:48:26 PDT
(In reply to comment #5) > (From update of attachment 113378 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=113378&action=review > > > Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:510 > > + } > > What about setting this when the frame rate controller in initializeImplOnImplThread, around line 510. Right after the frameRateController creation, just use m_layerTreeHostImpl->layerRendererCapabilities(). > Can't do that, the layer renderer isn't initialized at that point. We initialize the proxy, including creating the frame rate controller and scheduler, before initializing LRC or any GL stuff. I could change the initialization order around, possibly, but that might be complicated.
Nat Duca
Comment 7 2011-11-03 15:57:34 PDT
> I could change the initialization order around, possibly, but that might be complicated. Good point. I'll fix that up, b71515. This looks good to go.
James Robinson
Comment 8 2011-11-03 16:02:48 PDT
Ken - mind doing an official review on this now that Nat's looked it over?
Kenneth Russell
Comment 9 2011-11-03 16:25:43 PDT
Comment on attachment 113378 [details] Patch Looks fine to me.
James Robinson
Comment 10 2011-11-03 17:31:35 PDT
Comment on attachment 113378 [details] Patch Clearing flags on attachment: 113378 Committed r99253: <http://trac.webkit.org/changeset/99253>
James Robinson
Comment 11 2011-11-03 17:31:39 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.