RESOLVED FIXED Bug 95871
[chromium] Add a customized copy() method to CCRenderPassDrawQuad
https://bugs.webkit.org/show_bug.cgi?id=95871
Summary [chromium] Add a customized copy() method to CCRenderPassDrawQuad
Dana Jansens
Reported 2012-09-05 10:44:01 PDT
[chromium] Add a customized copy() method to CCRenderPassDrawQuad
Attachments
Patch (7.15 KB, patch)
2012-09-05 10:47 PDT, Dana Jansens
no flags
Dana Jansens
Comment 1 2012-09-05 10:47:27 PDT
Adrienne Walker
Comment 2 2012-09-05 13:10:25 PDT
Comment on attachment 162283 [details] Patch Is there a reason you can't just call setRenderPassId() post-copy?
Dana Jansens
Comment 3 2012-09-05 13:16:59 PDT
I think we should avoid setters on these classes. Instead it would construct a new CCRPDQ via constructor, giving it all the same values as the original except the ID. The copy method makes this simpler and also avoids API churn, and just looked better in the caller code. if (!isRenderPassQuad) newQuad = quad->copy(); else { castQuad = CCRPDQ::materialCast(quad); newQuad = CCRPDQ::create(castQuad->foo(), castQuad->bar(), castQuad->baz(), ....); } VS if (!isRenderPassQuad) newQuad = quad->copy(); else newQuad = CCRPDQ::materialCast(quad)->copy(newId);
Adrienne Walker
Comment 4 2012-09-05 14:29:52 PDT
Comment on attachment 162283 [details] Patch Ok, I am mildly convinced. R=me, assuming you get a clean EWS or CQ before submitting.
WebKit Review Bot
Comment 5 2012-09-06 10:28:44 PDT
Comment on attachment 162283 [details] Patch Clearing flags on attachment: 162283 Committed r127756: <http://trac.webkit.org/changeset/127756>
WebKit Review Bot
Comment 6 2012-09-06 10:28:47 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.