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

Unified Diff: cc/test/render_pass_test_utils.cc

Issue 12036091: Fixes a bug when the framebuffer is cleared with invalid scissor rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « cc/test/render_pass_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/render_pass_test_utils.cc
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index b9f12176aeb7db6ff7ba37b5f8cfa80fbca72368..bda83dd6e96e5b7b25b9d25fca139d2f0c1fd9e7 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -41,6 +41,21 @@ SolidColorDrawQuad* addQuad(TestRenderPass* pass,
return quadPtr;
}
+SolidColorDrawQuad* addClippedQuad(TestRenderPass* pass,
+ const gfx::Rect& rect,
+ SkColor color) {
+ MockQuadCuller quadSink(pass->quad_list, pass->shared_quad_state_list);
+ AppendQuadsData data(pass->id);
+ SharedQuadState* sharedState =
+ quadSink.useSharedQuadState(SharedQuadState::Create());
+ sharedState->SetAll(gfx::Transform(), rect, rect, true, 1);
+ scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
+ quad->SetNew(sharedState, rect, color);
+ SolidColorDrawQuad* quadPtr = quad.get();
+ quadSink.append(quad.PassAs<DrawQuad>(), data);
+ return quadPtr;
+}
+
void addRenderPassQuad(TestRenderPass* toPass,
TestRenderPass* contributingPass) {
MockQuadCuller quadSink(toPass->quad_list, toPass->shared_quad_state_list);
« no previous file with comments | « cc/test/render_pass_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698