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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1855373003: cc : Use same layer skipping functions in DrawPropertyUtils and LTHC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« cc/trees/layer_tree_host_common.cc ('K') | « cc/trees/layer_tree_host_common.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 406ae200ebe12bf8301156d4a7cbefeb3268554b..951ac71c69792f670a19c92905960e7183af28f8 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -150,39 +150,6 @@ TEST_F(LayerTreeHostCommonTest, TransformsForNoOpLayer) {
grand_child->screen_space_transform());
}
-TEST_F(LayerTreeHostCommonTest,
- ScreenSpaceTransformOfSkippedLayersWithHandlers) {
- // Even for layers that are skipped, we need to compute the correct screen
- // space transform because it is used during hit testing.
- LayerImpl* parent = root_layer();
- LayerImpl* child = AddChild<LayerImpl>(parent);
- LayerImpl* grand_child = AddChild<LayerImpl>(child);
- child->SetDrawsContent(true);
- grand_child->SetDrawsContent(true);
-
- gfx::Transform identity_matrix;
- SetLayerPropertiesForTesting(parent, identity_matrix, gfx::Point3F(),
- gfx::PointF(), gfx::Size(100, 100), true, false);
- SetLayerPropertiesForTesting(child, identity_matrix, gfx::Point3F(),
- gfx::PointF(10, 10), gfx::Size(100, 100), true,
- false);
- // This will cause the subtree to be skipped.
- child->SetOpacity(0.f);
- SetLayerPropertiesForTesting(grand_child, identity_matrix, gfx::Point3F(),
- gfx::PointF(10, 10), gfx::Size(100, 100), true,
- false);
- grand_child->SetTouchEventHandlerRegion(gfx::Rect(0, 0, 100, 100));
-
- ExecuteCalculateDrawProperties(parent);
-
- EXPECT_TRUE(child->has_render_surface());
- EXPECT_FALSE(grand_child->has_render_surface());
- // Check that we've computed draw properties for the subtree rooted at
- // |child|.
- EXPECT_FALSE(child->render_surface()->screen_space_transform().IsIdentity());
- EXPECT_FALSE(grand_child->ScreenSpaceTransform().IsIdentity());
-}
-
TEST_F(LayerTreeHostCommonTest, EffectTreeTransformIdTest) {
// Tests that effect tree node gets a valid transform id when a layer
// has opacity but doesn't create a render surface.
« cc/trees/layer_tree_host_common.cc ('K') | « cc/trees/layer_tree_host_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698