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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 2828353003: Determine mask UVs based on texture size (Closed)
Patch Set: Add tolerance to filter_effects.html Created 3 years, 8 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/trees/layer_tree_host_pixeltest_masks.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 2e7457a49aac6600be861bf479eb244c545a3d17..de0c68bcfa0e2306a0de94f8d875d33103fc9891 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -6725,10 +6725,10 @@ class LayerTreeTestMaskLayerForSurfaceWithClippedLayer : public LayerTreeTest {
RenderPassDrawQuad::MaterialCast(root_pass->quad_list.front());
EXPECT_EQ(gfx::Rect(20, 10, 10, 20).ToString(),
render_pass_quad->rect.ToString());
- // The masked layer is 50x50, but the surface size is 10x20. So the texture
- // coords in the mask are scaled by 10/50 and 20/50.
+ // The mask layer is 100x100, but the surface size is 10x20. So the texture
+ // coords in the mask are scaled by 10/100 and 20/100.
// The surface is clipped to (20,10) so the mask texture coords are offset
- // by 20/50 and 10/50
+ // by 20/100 and 10/100
if (host_impl->settings().enable_mask_tiling) {
PictureLayerImpl* mask_layer_impl = static_cast<PictureLayerImpl*>(
host_impl->active_tree()->LayerById(mask_layer_id_));
@@ -6740,7 +6740,7 @@ class LayerTreeTestMaskLayerForSurfaceWithClippedLayer : public LayerTreeTest {
.ToString(),
render_pass_quad->mask_uv_rect.ToString());
} else {
- EXPECT_EQ(gfx::ScaleRect(gfx::RectF(20.f, 10.f, 10.f, 20.f), 1.f / 50.f)
+ EXPECT_EQ(gfx::ScaleRect(gfx::RectF(20.f, 10.f, 10.f, 20.f), 1.f / 100.f)
.ToString(),
render_pass_quad->mask_uv_rect.ToString());
}
@@ -6946,7 +6946,7 @@ class LayerTreeTestMaskLayerWithDifferentBounds : public LayerTreeTest {
EXPECT_EQ(gfx::RectF(0.f, 0.f, 50.f / 128.f, 50.f / 128.f).ToString(),
render_pass_quad->mask_uv_rect.ToString());
} else {
- EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(),
+ EXPECT_EQ(gfx::RectF(0.f, 0.f, 50.f / 100.f, 50.f / 100.f).ToString(),
render_pass_quad->mask_uv_rect.ToString());
}
break;
@@ -6959,7 +6959,7 @@ class LayerTreeTestMaskLayerWithDifferentBounds : public LayerTreeTest {
EXPECT_EQ(gfx::RectF(0.f, 0.f, 50.f / 128.f, 50.f / 128.f).ToString(),
render_pass_quad->mask_uv_rect.ToString());
} else {
- EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(),
+ EXPECT_EQ(gfx::RectF(0.f, 0.f, 50.f / 100.f, 50.f / 100.f).ToString(),
render_pass_quad->mask_uv_rect.ToString());
}
EndTest();
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_masks.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698