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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1715973002: cc: Move tracking of layer_property_changed to main thread (3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/damage_tracker_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_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 753a5c2e5dd65683bbdc64a48770ffe94b48d287..09840ce6ae9ee55eeea482f814fffefcbe86ca1f 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -3278,20 +3278,9 @@ class LayerTreeHostTestPushPropertiesAddingToTreeRequiresPush
int last_source_frame_number = layer_tree_host()->source_frame_number() - 1;
switch (last_source_frame_number) {
case 0:
+ // All layers except root will need push properties as they are added
+ // as a child to some other layer which changes their stacking order.
EXPECT_FALSE(root_->needs_push_properties());
- EXPECT_FALSE(root_->descendant_needs_push_properties());
- EXPECT_FALSE(child_->needs_push_properties());
- EXPECT_FALSE(child_->descendant_needs_push_properties());
- EXPECT_FALSE(grandchild1_->needs_push_properties());
- EXPECT_FALSE(grandchild1_->descendant_needs_push_properties());
- EXPECT_FALSE(grandchild2_->needs_push_properties());
- EXPECT_FALSE(grandchild2_->descendant_needs_push_properties());
- EXPECT_FALSE(grandchild3_->needs_push_properties());
- EXPECT_FALSE(grandchild3_->descendant_needs_push_properties());
-
- layer_tree_host()->SetRootLayer(root_);
-
- EXPECT_TRUE(root_->needs_push_properties());
EXPECT_TRUE(root_->descendant_needs_push_properties());
EXPECT_TRUE(child_->needs_push_properties());
EXPECT_TRUE(child_->descendant_needs_push_properties());
@@ -3301,6 +3290,12 @@ class LayerTreeHostTestPushPropertiesAddingToTreeRequiresPush
EXPECT_FALSE(grandchild2_->descendant_needs_push_properties());
EXPECT_TRUE(grandchild3_->needs_push_properties());
EXPECT_FALSE(grandchild3_->descendant_needs_push_properties());
+
+ layer_tree_host()->SetRootLayer(root_);
+
+ // Now, even the root will need to push properties.
+ EXPECT_TRUE(root_->needs_push_properties());
+ EXPECT_TRUE(root_->descendant_needs_push_properties());
break;
case 1:
EndTest();
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698