Bug 94957 - [chromium] Have RenderSurface create and add its own generated RenderPass
Summary: [chromium] Have RenderSurface create and add its own generated RenderPass
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: Dana Jansens
URL:
Keywords:
Depends on:
Blocks: 95109
  Show dependency treegraph
 
Reported: 2012-08-24 10:59 PDT by Dana Jansens
Modified: 2012-08-27 13:46 PDT (History)
7 users (show)

See Also:


Attachments
Patch (15.76 KB, patch)
2012-08-24 11:05 PDT, Dana Jansens
no flags Details | Formatted Diff | Diff
Patch for landing (15.77 KB, patch)
2012-08-27 12:21 PDT, Dana Jansens
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dana Jansens 2012-08-24 10:59:34 PDT
[chromium] Have RenderSurface create and add its own generated RenderPass
Comment 1 Dana Jansens 2012-08-24 11:05:01 PDT
Created attachment 160455 [details]
Patch
Comment 2 Adrienne Walker 2012-08-24 16:12:04 PDT
Comment on attachment 160455 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:287
> +        renderSurfaceLayer->renderSurface()->appendRenderPasses(frame);

Aren't you eventually going to want to call appendRenderPasses on a DelegatingLayer? Maybe this would be better if it initially went through the layer who could then call CCRenderSurface::appendRenderPasses internally.  This would also give you some nice symmetry where if a layer adds a pass, then it is also the one that will get called back later to appendQuads (if the pass isn't cached).

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:97
> +        // CCRenderPassSink implementation.
> +        virtual void appendRenderPass(PassOwnPtr<CCRenderPass>);

OVERRIDE
Comment 3 Adrienne Walker 2012-08-24 16:13:45 PDT
(In reply to comment #2)
> (From update of attachment 160455 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=160455&action=review
> 
> > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:287
> > +        renderSurfaceLayer->renderSurface()->appendRenderPasses(frame);
> 
> Aren't you eventually going to want to call appendRenderPasses on a DelegatingLayer? Maybe this would be better if it initially went through the layer who could then call CCRenderSurface::appendRenderPasses internally.  This would also give you some nice symmetry where if a layer adds a pass, then it is also the one that will get called back later to appendQuads (if the pass isn't cached).

Actually, now that I think about it, it's more complicated than that.  This is a good refactoring first step, and I can wait to see what the delegating layer will have to change to make it work.
Comment 4 Adrienne Walker 2012-08-24 16:19:46 PDT
Comment on attachment 160455 [details]
Patch

R=me.
Comment 5 Dana Jansens 2012-08-27 12:20:09 PDT
Comment on attachment 160455 [details]
Patch

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

>>> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:287
>>> +        renderSurfaceLayer->renderSurface()->appendRenderPasses(frame);
>> 
>> Aren't you eventually going to want to call appendRenderPasses on a DelegatingLayer? Maybe this would be better if it initially went through the layer who could then call CCRenderSurface::appendRenderPasses internally.  This would also give you some nice symmetry where if a layer adds a pass, then it is also the one that will get called back later to appendQuads (if the pass isn't cached).
> 
> Actually, now that I think about it, it's more complicated than that.  This is a good refactoring first step, and I can wait to see what the delegating layer will have to change to make it work.

Yeh, we only call append on layers that own RenderSurfaces, which the DelgatedRendererLayer does not usually do.

>> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:97
>> +        virtual void appendRenderPass(PassOwnPtr<CCRenderPass>);
> 
> OVERRIDE

Oops thanks.
Comment 6 Dana Jansens 2012-08-27 12:21:09 PDT
Created attachment 160773 [details]
Patch for landing
Comment 7 WebKit Review Bot 2012-08-27 13:46:21 PDT
Comment on attachment 160773 [details]
Patch for landing

Clearing flags on attachment: 160773

Committed r126790: <http://trac.webkit.org/changeset/126790>
Comment 8 WebKit Review Bot 2012-08-27 13:46:24 PDT
All reviewed patches have been landed.  Closing bug.