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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2875133003: Remove Layer{Impl}::FilterIsAnimating. (Closed)
Patch Set: Sync to head. Created 3 years, 7 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') | 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 49e5efd7d42e4d979c9ae9914e8ec467678f1b4b..e4a6f57d3d250c7efd054050ca9c8e0e2e64b671 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -8329,6 +8329,11 @@ TEST_F(LayerTreeHostCommonTest, AnimatedOpacityCreatesRenderSurface) {
EXPECT_EQ(GetRenderSurface(grandchild), GetRenderSurface(child));
}
+static bool FilterIsAnimating(LayerImpl* layer) {
+ return layer->GetMutatorHost()->IsAnimatingFilterProperty(
+ layer->element_id(), layer->GetElementTypeForAnimation());
+}
+
// Verify that having an animated filter (but no current filter, as these
// are mutually exclusive) correctly creates a render surface.
TEST_F(LayerTreeHostCommonTest, AnimatedFilterCreatesRenderSurface) {
@@ -8352,9 +8357,9 @@ TEST_F(LayerTreeHostCommonTest, AnimatedFilterCreatesRenderSurface) {
EXPECT_TRUE(GetRenderSurface(root)->Filters().IsEmpty());
EXPECT_TRUE(GetRenderSurface(child)->Filters().IsEmpty());
- EXPECT_FALSE(root->FilterIsAnimating());
- EXPECT_TRUE(child->FilterIsAnimating());
- EXPECT_FALSE(grandchild->FilterIsAnimating());
+ EXPECT_FALSE(FilterIsAnimating(root));
+ EXPECT_TRUE(FilterIsAnimating(child));
+ EXPECT_FALSE(FilterIsAnimating(grandchild));
}
// Verify that having a filter animation with a delayed start time creates a
@@ -8396,11 +8401,11 @@ TEST_F(LayerTreeHostCommonTest, DelayedFilterAnimationCreatesRenderSurface) {
EXPECT_TRUE(GetRenderSurface(root)->Filters().IsEmpty());
EXPECT_TRUE(GetRenderSurface(child)->Filters().IsEmpty());
- EXPECT_FALSE(root->FilterIsAnimating());
+ EXPECT_FALSE(FilterIsAnimating(root));
EXPECT_FALSE(root->HasPotentiallyRunningFilterAnimation());
- EXPECT_FALSE(child->FilterIsAnimating());
+ EXPECT_FALSE(FilterIsAnimating(child));
EXPECT_TRUE(child->HasPotentiallyRunningFilterAnimation());
- EXPECT_FALSE(grandchild->FilterIsAnimating());
+ EXPECT_FALSE(FilterIsAnimating(grandchild));
EXPECT_FALSE(grandchild->HasPotentiallyRunningFilterAnimation());
}
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698