Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3549)

Unified Diff: cc/quads/render_pass.h

Issue 368403003: Use RenderPass to create DrawQuad in unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layerrawptrDQ
Patch Set: actually fix error this time Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/quads/render_pass.h
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index ce5a90e514d8772695c0be2d91203adfa0665795..4ca5f900870c40713dfea2f9b7ccd4c23faadd08 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -95,6 +95,13 @@ class CC_EXPORT RenderPass {
quad_list.push_back(draw_quad.template PassAs<DrawQuad>());
return static_cast<DrawQuadType*>(quad_list.back());
}
+ template <typename DrawQuadType>
+ DrawQuadType* CopyFromAndAppendDrawQuad(const DrawQuadType* quad) {
danakj 2014/07/07 22:30:15 Can we do two methods: 1. that takes DrawQuad* an
weiliangc 2014/07/08 21:54:38 Done.
+ scoped_ptr<DrawQuadType> draw_quad =
+ make_scoped_ptr(new DrawQuadType(*quad));
+ quad_list.push_back(draw_quad.template PassAs<DrawQuad>());
+ return static_cast<DrawQuadType*>(quad_list.back());
+ }
// Uniquely identifies the render pass in the compositor's current frame.
Id id;

Powered by Google App Engine
This is Rietveld 408576698