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

Unified Diff: cc/layers/layer_impl_unittest.cc

Issue 2270273002: cc : Add OnFilterAnimated to effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 4 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/layers/layer_impl.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl_unittest.cc
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index fbc48505e6d10b4066d0aeeaa2d7e5d8dc143251..808e1f4650ed1aaf4373befa0d93c49a24a34eb9 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -180,9 +180,14 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
// Changing these properties affects the entire subtree of layers.
- EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->OnFilterAnimated(arbitrary_filters));
- EXECUTE_AND_VERIFY_SUBTREE_CHANGED(
- root->OnFilterAnimated(FilterOperations()));
+ EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED(
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ arbitrary_filters, root->effect_tree_index(),
+ host_impl.active_tree()));
+ EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED(
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ FilterOperations(), root->effect_tree_index(),
+ host_impl.active_tree()));
EXECUTE_AND_VERIFY_NO_NEED_TO_PUSH_PROPERTIES_AND_SUBTREE_CHANGED(
host_impl.active_tree()->property_trees()->effect_tree.OnOpacityAnimated(
arbitrary_number, root->effect_tree_index(),
@@ -288,13 +293,21 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
// Related filter functions.
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
- root->OnFilterAnimated(arbitrary_filters));
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ arbitrary_filters, root->effect_tree_index(),
+ host_impl.active_tree()));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
- root->OnFilterAnimated(arbitrary_filters));
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ arbitrary_filters, root->effect_tree_index(),
+ host_impl.active_tree()));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
- root->OnFilterAnimated(FilterOperations()));
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ FilterOperations(), root->effect_tree_index(),
+ host_impl.active_tree()));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
- root->OnFilterAnimated(arbitrary_filters));
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ arbitrary_filters, root->effect_tree_index(),
+ host_impl.active_tree()));
// Related scrolling functions.
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size));
@@ -343,7 +356,9 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
layer->test_properties()->filters = arbitrary_filters;
host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
- layer->OnFilterAnimated(arbitrary_filters));
+ host_impl.active_tree()->property_trees()->effect_tree.OnFilterAnimated(
+ arbitrary_filters, layer->effect_tree_index(),
+ host_impl.active_tree()));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698