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

Unified Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 2354753003: cc : Compute visible rects dynamically (2) (Closed)
Patch Set: comments 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/layer_tree_host_common_unittest.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_impl_unittest.cc
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index 22b84cc974072b46050e4dd9eb4fd0e245d3f10f..47d4435117e2df1ec3c8d90e2c40bea041f9a0b8 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -244,7 +244,14 @@ TEST_F(LayerTreeImplTest, HitTestingForUninvertibleTransform) {
root->SetDrawsContent(true);
host_impl().SetViewportSize(root->bounds());
- host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree();
+ // While computing visible rects by combining clips in screen space, we set
+ // the entire layer as visible if the screen space transform is singular. This
+ // is not always true when we combine clips in target space because if the
+ // intersection of combined_clip in taret space with layer_rect projected to
+ // target space is empty, we set it to an empty rect.
+ bool skip_verify_visible_rect_calculations = true;
+ host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree(
+ skip_verify_visible_rect_calculations);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
@@ -1333,7 +1340,14 @@ TEST_F(LayerTreeImplTest,
root->SetTouchEventHandlerRegion(touch_handler_region);
host_impl().SetViewportSize(root->bounds());
- host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree();
+ // While computing visible rects by combining clips in screen space, we set
+ // the entire layer as visible if the screen space transform is singular. This
+ // is not always true when we combine clips in target space because if the
+ // intersection of combined_clip in taret space with layer_rect projected to
+ // target space is empty, we set it to an empty rect.
+ bool skip_verify_visible_rect_calculations = true;
+ host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree(
+ skip_verify_visible_rect_calculations);
// Sanity check the scenario we just created.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698