WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
95485
[chromium] Add a copy() method to CCRenderPass
https://bugs.webkit.org/show_bug.cgi?id=95485
Summary
[chromium] Add a copy() method to CCRenderPass
Dana Jansens
Reported
2012-08-30 11:46:53 PDT
[chromium] Add a copy() method to CCRenderPass
Attachments
Patch
(8.12 KB, patch)
2012-08-30 11:47 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(9.19 KB, patch)
2012-08-30 13:21 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(9.19 KB, patch)
2012-08-30 13:22 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(9.34 KB, patch)
2012-09-05 12:59 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch for landing
(9.34 KB, patch)
2012-09-05 13:57 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-08-30 11:47:58 PDT
Created
attachment 161525
[details]
Patch
Alexandre Elias
Comment 2
2012-08-30 12:07:35 PDT
I'm wondering if these copy methods are really needed? In the child, the pickler can take references to the objects and then serialize them into a byte blob. In the parent, it can populate objects from the byte blob. Where does copying a CCRenderPass into another CCRenderPass come in?
Dana Jansens
Comment 3
2012-08-30 12:57:15 PDT
The DelegatedRendererLayer has a set of RenderPasses. It needs to copy them into the FrameData's set of RenderPasses in order to have them be part of the frame. (It's unrelated to IPC)
Alexandre Elias
Comment 4
2012-08-30 13:01:26 PDT
What if the DelegatedRendererLayer held a FrameData in the first place? Seems we should be able to come up with some ownership model that avoids copying.
Dana Jansens
Comment 5
2012-08-30 13:04:55 PDT
It still has to copy from its own FrameData into the CCLTHI's FrameData. You can do it without copying certainly but it complicates the code some. Currently CCLTHI::FrameData::renderPassedById owns all the renderPasses in the frame. Then suddenly it could only own some, with some DelegatedRendererLayer (DRL) owning others. Also it complicates updating the DRL. If it gets a new set of RenderPasses now it has to keep its old RenderPasses alive until the frame is done with them. As enne put it to me, other layers create quads/renderPasses every frame, so I don't think a copy is going to be bad here.
Dana Jansens
Comment 6
2012-08-30 13:21:10 PDT
Created
attachment 161538
[details]
Patch Make the copy() test fail when a new field is added to CCRenderPass without some user intervention in a cross-platform way. And verify that quads are not copied.
Dana Jansens
Comment 7
2012-08-30 13:22:17 PDT
Created
attachment 161539
[details]
Patch fix changelog
Dana Jansens
Comment 8
2012-08-30 13:27:56 PDT
To further discuss copying, it's more complicated for quads as well. A renderPass owns quads. But the quads in the root renderPass within the DRL need to be merged into the targetRenderPass for the layer. So they would need to be unowned by the DRL, owned by the targetRenderPass, then given back to the DRL after the frame was done... copying is so much simpler in this case. And I think using the same ownership model for quads in non-root render passes within DRL will make our lives much easier.
Alexandre Elias
Comment 9
2012-08-30 14:01:32 PDT
OK, sounds good, thanks for explaining.
Dana Jansens
Comment 10
2012-09-05 12:59:01 PDT
Created
attachment 162312
[details]
Patch rebase
Adrienne Walker
Comment 11
2012-09-05 13:51:06 PDT
Comment on
attachment 162312
[details]
Patch R=me. aelias: I had the same mental balking about the extra copying, but I'm willing to take the software complexity vs. execution time tradeoff in the short term until we figure out that it's too slow. That being said, there's probably simpler optimizations to decrease copying and number of allocations than changing the ownership model, in my opinion.
Dana Jansens
Comment 12
2012-09-05 13:57:29 PDT
Created
attachment 162326
[details]
Patch for landing
WebKit Review Bot
Comment 13
2012-09-06 02:48:19 PDT
Comment on
attachment 162326
[details]
Patch for landing Clearing flags on attachment: 162326 Committed
r127715
: <
http://trac.webkit.org/changeset/127715
>
WebKit Review Bot
Comment 14
2012-09-06 02:48:23 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