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

Unified Diff: cc/output/renderer_pixeltest.cc

Issue 652393002: cc: Make RenderPassAndMaskWithPartialQuad not use arbitrary uvs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | cc/test/data/mask_partial_quad.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/renderer_pixeltest.cc
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index 00c91008e29bfc51bcb60b2b742765462058f4c2..3ef18acff5d860ebaf4fef6b337e45fb72c61967 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -1223,12 +1223,11 @@ TYPED_TEST(RendererPixelTest, RenderPassAndMaskWithPartialQuad) {
// This RenderPassDrawQuad does not include the full |viewport_rect| which is
// the size of the child render pass.
- gfx::Rect sub_rect = gfx::Rect(50, 50, 100, 100);
+ gfx::Rect sub_rect = gfx::Rect(50, 50, 200, 100);
enne (OOO) 2014/10/14 22:54:28 Why not test more things while I'm here, like diff
EXPECT_NE(sub_rect.x(), child_pass->output_rect.x());
EXPECT_NE(sub_rect.y(), child_pass->output_rect.y());
EXPECT_NE(sub_rect.right(), child_pass->output_rect.right());
EXPECT_NE(sub_rect.bottom(), child_pass->output_rect.bottom());
- EXPECT_TRUE(child_pass->output_rect.Contains(sub_rect));
// Set up a mask on the RenderPassDrawQuad.
RenderPassDrawQuad* mask_quad =
@@ -1238,10 +1237,10 @@ TYPED_TEST(RendererPixelTest, RenderPassAndMaskWithPartialQuad) {
sub_rect,
child_pass_id,
mask_resource_id,
- gfx::RectF(1.f, 1.f), // mask_uv_rect
- FilterOperations(), // foreground filters
- gfx::Vector2dF(), // filters scale
- FilterOperations()); // background filters
+ gfx::RectF(0.5f, 0.5f, 2.f, 1.f), // mask_uv_rect
+ FilterOperations(), // foreground filters
+ gfx::Vector2dF(), // filters scale
+ FilterOperations()); // background filters
// White background behind the masked render pass.
SolidColorDrawQuad* white =
@@ -1258,7 +1257,7 @@ TYPED_TEST(RendererPixelTest, RenderPassAndMaskWithPartialQuad) {
EXPECT_TRUE(this->RunPixelTest(
&pass_list,
- base::FilePath(FILE_PATH_LITERAL("image_mask_of_layer.png")),
+ base::FilePath(FILE_PATH_LITERAL("mask_partial_quad.png")),
danakj 2014/10/15 00:10:19 can you name the image like "mask_bottom_right" or
enne (OOO) 2014/10/15 01:07:48 Done.
ExactPixelComparator(true)));
}
« no previous file with comments | « no previous file | cc/test/data/mask_partial_quad.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698