Bug 91555 - [chromium] Ubercomp: clean up CCRenderer interface
Summary: [chromium] Ubercomp: clean up CCRenderer interface
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: Alexandre Elias
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 16:31 PDT by Alexandre Elias
Modified: 2012-07-19 10:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (14.13 KB, patch)
2012-07-17 16:41 PDT, Alexandre Elias
no flags Details | Formatted Diff | Diff
Patch (14.13 KB, patch)
2012-07-18 13:49 PDT, Alexandre Elias
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Elias 2012-07-17 16:31:42 PDT
[chromium] Ubercomp: clean up CCRenderer interface
Comment 1 Alexandre Elias 2012-07-17 16:41:04 PDT
Created attachment 152873 [details]
Patch
Comment 2 Alexandre Elias 2012-07-17 16:41:24 PDT
This is an small cleanup to reduce boilerplate in the ubercomp implementation.  When CCHeadsUpDisplay is better integrated into LayerRendererChromium, we should make private finishDrawingFrame() as well.
Comment 3 Dana Jansens 2012-07-18 06:41:05 PDT
Comment on attachment 152873 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152873&action=review

> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:368
> +        renderPass->targetSurface()->damageTracker()->didDrawDamagedArea();

This won't be able to stay here obviously, once targetSurface() is gone. So if we are going to do this, we have to guarantee that every render pass given to drawFrame() is actually drawn. I'm not sure that this is going to make our lives easier.. I'm currently adding another piece to the code in CCLTHI::drawLayers() that would then go here. But it really belongs there. CCLTHI manages the RenderPasses, LRC just draws them.

So overall, I feel like this is not going to help us and isn't worth removing one method from the API. :/
Comment 4 Alexandre Elias 2012-07-18 13:38:29 PDT
For ubercomp, I was going to have to stash away pointers to the renderpasses as they came in, reconstruct the render pass list, and then do the actual work in finishDrawingFrame().  It seems to me that the one-at-a-time model is an implementation detail of OpenGL.  Why shouldn't we make sure that the only renderpasses sent to CCRenderer will be actually drawn; that seems like a good idea anyway?

We can still do some work on the side in CCLTHI; I'm fine with moving the didDrawDamaged area back there in a loop over the render passes.
Comment 5 Alexandre Elias 2012-07-18 13:49:40 PDT
Created attachment 153082 [details]
Patch

Move didDrawDamagedArea back to LTHI
Comment 6 Adrienne Walker 2012-07-18 14:28:32 PDT
Comment on attachment 153082 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=153082&action=review

R=me.

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:555
> +    m_layerRenderer->drawFrame(frame.renderPasses, m_rootScissorRect);
> +    if (m_headsUpDisplay->enabled(settings()))
> +        m_headsUpDisplay->draw(this);
> +    m_layerRenderer->finishDrawingFrame();

It's a little weird to me to have this asymmetric finish function without an exposed begin, but I understand that you need to draw some extra stuff in the frame here.  The heads up display is a little bit of a wart, and I'm not sure if it should be generating quads or be completely contained within LRC or something else.  Refactoring for the future, I guess.
Comment 7 WebKit Review Bot 2012-07-18 15:33:19 PDT
Comment on attachment 153082 [details]
Patch

Clearing flags on attachment: 153082

Committed r123033: <http://trac.webkit.org/changeset/123033>
Comment 8 WebKit Review Bot 2012-07-18 15:33:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Tony Chang 2012-07-19 10:17:36 PDT
Reverted r123036 for reason:

Triggers some DCHECKs in Chromium browser_tests

Committed r123120: <http://trac.webkit.org/changeset/123120>
Comment 10 Dana Jansens 2012-07-19 10:20:18 PDT
Comment on attachment 153082 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=153082&action=review

>> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:555
>> +    m_layerRenderer->finishDrawingFrame();
> 
> It's a little weird to me to have this asymmetric finish function without an exposed begin, but I understand that you need to draw some extra stuff in the frame here.  The heads up display is a little bit of a wart, and I'm not sure if it should be generating quads or be completely contained within LRC or something else.  Refactoring for the future, I guess.

Making quads I think so a child renderer can display a hud.
Comment 11 Nate Chapin 2012-07-19 10:37:33 PDT
(In reply to comment #9)
> Reverted r123036 for reason:
> 
> Triggers some DCHECKs in Chromium browser_tests
> 
> Committed r123120: <http://trac.webkit.org/changeset/123120>

The ChangeLog got mangled, it wasn't this bug that got reverted.