WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
95109
[chromium] A general mechanism for passing data into and out of appendQuads and quadCuller via CCAppendQuadsData
https://bugs.webkit.org/show_bug.cgi?id=95109
Summary
[chromium] A general mechanism for passing data into and out of appendQuads a...
Dana Jansens
Reported
2012-08-27 11:46:53 PDT
[chromium] A general mechanism for passing data into and out of appendQuads and quadCuller via CCAppendQuadsData
Attachments
Patch
(58.07 KB, patch)
2012-08-27 12:12 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(60.90 KB, patch)
2012-08-27 13:51 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(56.48 KB, patch)
2012-08-27 15:44 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-08-27 12:12:21 PDT
Created
attachment 160771
[details]
Patch
WebKit Review Bot
Comment 2
2012-08-27 13:25:23 PDT
Comment on
attachment 160771
[details]
Patch
Attachment 160771
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13613303
Dana Jansens
Comment 3
2012-08-27 13:29:46 PDT
Oops I missed the new header, I'll rebase and upload again when 94957 lands.
Dana Jansens
Comment 4
2012-08-27 13:51:20 PDT
Created
attachment 160796
[details]
Patch
Adrienne Walker
Comment 5
2012-08-27 15:01:48 PDT
Comment on
attachment 160796
[details]
Patch The CCQuadSinkData hierarchy feels a little bit overengineered to me and I think it's more complex than its benefits. I understand the need to reduce plumbing churn by putting common function signature parameters into a struct. I'd prefer to see something more simple like: struct CCAppendQuadsData { bool hadMissingTiles; bool hadOcclusionFromOutsideTargetSurface; // FIXME: Hold the delegatedRenderPassId for the DelegatedRendererLayer. }; I don't find it problematic that CCQuadCuller has a boolean about whether it has occlusion from outside the target surface. The quad culler is stateful about the quads that have been appended to it, and this is extra information that it has calculated. It feels no different from asking about occlusion/unocclusion in a rect or overdraw. What do you think about having CCQuadSink::append just take a bool& hadExternalOcclusion? Alternatively, CCQuadSink::hasExternalOcclusion()?
Dana Jansens
Comment 6
2012-08-27 15:05:18 PDT
(In reply to
comment #5
)
> (From update of
attachment 160796
[details]
) > The CCQuadSinkData hierarchy feels a little bit overengineered to me and I think it's more complex than its benefits. I understand the need to reduce plumbing churn by putting common function signature parameters into a struct. I'd prefer to see something more simple like: > > struct CCAppendQuadsData > { > bool hadMissingTiles; > bool hadOcclusionFromOutsideTargetSurface; > // FIXME: Hold the delegatedRenderPassId for the DelegatedRendererLayer. > }; > > I don't find it problematic that CCQuadCuller has a boolean about whether it has occlusion from outside the target surface. The quad culler is stateful about the quads that have been appended to it, and this is extra information that it has calculated. It feels no different from asking about occlusion/unocclusion in a rect or overdraw. > > What do you think about having CCQuadSink::append just take a bool& hadExternalOcclusion? Alternatively, CCQuadSink::hasExternalOcclusion()?
I feel like the hadExternalOcclusion information is very similar to hadMissingTiles, but they are channeled through completely different paths. I like append() taking a bool& more, but we're just getting more and more parameters to CCLayerImpl::appendQuads(quadSink, bool&, bool&, CCRenderPassList&) and so on into the sunset. We could just use a CCAppendQuadsData struct and have QuadSink take that. I was just trying to keep it more abstract-y.. for better or worse. Would that feel better to you?
Adrienne Walker
Comment 7
2012-08-27 15:27:40 PDT
(In reply to
comment #6
)
> I feel like the hadExternalOcclusion information is very similar to hadMissingTiles, but they are channeled through completely different paths. I like append() taking a bool& more, but we're just getting more and more parameters to CCLayerImpl::appendQuads(quadSink, bool&, bool&, CCRenderPassList&) and so on into the sunset.
...but CCQuadSink won't need an additional parameter in the future, though. CCLayerImpl::appendQuads could continue taking CCAppendQuadsData& which could expand later, but the underlying CCQuadSink::append function could just take a bool&.
Dana Jansens
Comment 8
2012-08-27 15:28:55 PDT
(In reply to
comment #7
)
> (In reply to
comment #6
) > > > I feel like the hadExternalOcclusion information is very similar to hadMissingTiles, but they are channeled through completely different paths. I like append() taking a bool& more, but we're just getting more and more parameters to CCLayerImpl::appendQuads(quadSink, bool&, bool&, CCRenderPassList&) and so on into the sunset. > > ...but CCQuadSink won't need an additional parameter in the future, though. CCLayerImpl::appendQuads could continue taking CCAppendQuadsData& which could expand later, but the underlying CCQuadSink::append function could just take a bool&.
Oh I see. But then every layer has to unpack the bool& from the struct in order to call append, instead of just passing along the forward-declared struct.
Adrienne Walker
Comment 9
2012-08-27 15:32:19 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (In reply to
comment #6
) > > > > > I feel like the hadExternalOcclusion information is very similar to hadMissingTiles, but they are channeled through completely different paths. I like append() taking a bool& more, but we're just getting more and more parameters to CCLayerImpl::appendQuads(quadSink, bool&, bool&, CCRenderPassList&) and so on into the sunset. > > > > ...but CCQuadSink won't need an additional parameter in the future, though. CCLayerImpl::appendQuads could continue taking CCAppendQuadsData& which could expand later, but the underlying CCQuadSink::append function could just take a bool&. > > Oh I see. But then every layer has to unpack the bool& from the struct in order to call append, instead of just passing along the forward-declared struct.
It's true. Although, that way only CCLayerImpl really has to know about CCAppendQuadsData? If you don't like that, I think I'm also ok with your other suggestion of CCQuadSink just taking a CCAppendQuadsData&. It seems about equivalent.
Dana Jansens
Comment 10
2012-08-27 15:44:29 PDT
Created
attachment 160831
[details]
Patch simplified to a single struct
Adrienne Walker
Comment 11
2012-08-27 16:01:04 PDT
Comment on
attachment 160831
[details]
Patch R=me.
WebKit Review Bot
Comment 12
2012-08-27 16:39:35 PDT
Comment on
attachment 160831
[details]
Patch Clearing flags on attachment: 160831 Committed
r126819
: <
http://trac.webkit.org/changeset/126819
>
WebKit Review Bot
Comment 13
2012-08-27 16:39:38 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.
Top of Page
Format For Printing
XML
Clone This Bug