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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2305873002: cc: Include viewport clip in visible rect of unclipped surfaces (Closed)
Patch Set: Created 4 years, 3 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/draw_property_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 9ee12f9c0a21e90c5001c0d63015d0b81c7ad10c..f06ac359be262d5837dfdd66c5142c5bdcb9bc6e 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -3346,12 +3346,12 @@ TEST_F(LayerTreeHostCommonTest,
ExecuteCalculateDrawProperties(root);
EXPECT_EQ(gfx::Rect(100, 100), root->visible_layer_rect());
EXPECT_EQ(gfx::Rect(98, 98), parent->visible_layer_rect());
- EXPECT_EQ(gfx::Rect(800, 800), child1->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(94, 94), child1->visible_layer_rect());
EXPECT_EQ(gfx::Rect(800, 800), child2->visible_layer_rect());
- EXPECT_EQ(gfx::Rect(792, 792), grand_child1->visible_layer_rect());
- EXPECT_EQ(gfx::Rect(1500, 1500), grand_child2->visible_layer_rect());
- EXPECT_EQ(gfx::Rect(776, 776), leaf_node1->visible_layer_rect());
- EXPECT_EQ(gfx::Rect(1491, 1491), leaf_node2->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(86, 86), grand_child1->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(88, 88), grand_child2->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(70, 70), leaf_node1->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(79, 79), leaf_node2->visible_layer_rect());
EXPECT_EQ(gfx::Rect(100, 100), root->drawable_content_rect());
EXPECT_EQ(gfx::Rect(2, 2, 400, 400), parent->drawable_content_rect());
@@ -3793,7 +3793,7 @@ TEST_F(LayerTreeHostCommonTest,
child1->SetMasksToBounds(true);
child2->SetMasksToBounds(true);
ExecuteCalculateDrawProperties(root);
- EXPECT_EQ(gfx::Rect(500, 500), child1->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(100, 100), child1->visible_layer_rect());
EXPECT_EQ(gfx::Rect(100, 100), render_surface2->visible_layer_rect());
}
@@ -3966,7 +3966,7 @@ TEST_F(LayerTreeHostCommonTest, RootClipPropagationToClippedSurface) {
ExecuteCalculateDrawProperties(root);
EXPECT_EQ(gfx::Rect(50, 50), unclipped_surface->visible_layer_rect());
- EXPECT_EQ(gfx::Rect(50, 50), unclipped_desc_surface->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(10, 10), unclipped_desc_surface->visible_layer_rect());
EXPECT_EQ(gfx::Rect(10, 10), clipped_surface->visible_layer_rect());
}
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698