Bug 95871 - [chromium] Add a customized copy() method to CCRenderPassDrawQuad
Summary: [chromium] Add a customized copy() method to CCRenderPassDrawQuad
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: 95374
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-05 10:44 PDT by Dana Jansens
Modified: 2012-09-06 10:28 PDT (History)
7 users (show)

See Also:


Attachments
Patch (7.15 KB, patch)
2012-09-05 10:47 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-09-05 10:44:01 PDT
[chromium] Add a customized copy() method to CCRenderPassDrawQuad
Comment 1 Dana Jansens 2012-09-05 10:47:27 PDT
Created attachment 162283 [details]
Patch
Comment 2 Adrienne Walker 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?
Comment 3 Dana Jansens 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);
Comment 4 Adrienne Walker 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.
Comment 5 WebKit Review Bot 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>
Comment 6 WebKit Review Bot 2012-09-06 10:28:47 PDT
All reviewed patches have been landed.  Closing bug.