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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1921583003: CC Animation: Let MutatorHostClient deals with elements instead of layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@elementid
Patch Set: Rename methods in ElementAnimations 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
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | 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 a07dc28c95fbd49ad4eacded78a2f695e7ce4d12..0d4b50ef802c6e073c28222dd08046b6035b31dc 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -8943,11 +8943,11 @@ TEST_F(LayerTreeHostCommonTest, SkippingLayerImpl) {
std::unique_ptr<Animation> transform_animation(
Animation::Create(std::move(curve), 3, 3, TargetProperty::TRANSFORM));
scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1));
- host_impl.active_tree()->animation_host()->RegisterPlayerForLayer(
+ host_impl.active_tree()->animation_host()->RegisterPlayerForElement(
root_ptr->id(), player.get());
host_impl.active_tree()
->animation_host()
- ->GetElementAnimationsForLayerId(root_ptr->id())
+ ->GetElementAnimationsForElementId(root_ptr->id())
->AddAnimation(std::move(transform_animation));
grandchild_ptr->set_visible_layer_rect(gfx::Rect());
child_ptr->SetScrollClipLayer(root_ptr->id());
@@ -8957,7 +8957,7 @@ TEST_F(LayerTreeHostCommonTest, SkippingLayerImpl) {
ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr);
EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect());
- host_impl.active_tree()->animation_host()->UnregisterPlayerForLayer(
+ host_impl.active_tree()->animation_host()->UnregisterPlayerForElement(
root_ptr->id(), player.get());
}
@@ -8998,19 +8998,19 @@ TEST_F(LayerTreeHostCommonTest, LayerSkippingInSubtreeOfSingularTransform) {
std::unique_ptr<Animation> transform_animation(
Animation::Create(std::move(curve), 3, 3, TargetProperty::TRANSFORM));
scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1));
- host_impl()->active_tree()->animation_host()->RegisterPlayerForLayer(
+ host_impl()->active_tree()->animation_host()->RegisterPlayerForElement(
grand_child->id(), player.get());
host_impl()
->active_tree()
->animation_host()
- ->GetElementAnimationsForLayerId(grand_child->id())
+ ->GetElementAnimationsForElementId(grand_child->id())
->AddAnimation(std::move(transform_animation));
ExecuteCalculateDrawProperties(root);
EXPECT_EQ(gfx::Rect(0, 0), grand_child->visible_layer_rect());
EXPECT_EQ(gfx::Rect(0, 0), child->visible_layer_rect());
- host_impl()->active_tree()->animation_host()->UnregisterPlayerForLayer(
+ host_impl()->active_tree()->animation_host()->UnregisterPlayerForElement(
grand_child->id(), player.get());
}
@@ -9069,11 +9069,11 @@ TEST_F(LayerTreeHostCommonTest, SkippingPendingLayerImpl) {
std::unique_ptr<Animation> animation(
Animation::Create(std::move(curve), 3, 3, TargetProperty::OPACITY));
scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1));
- host_impl.active_tree()->animation_host()->RegisterPlayerForLayer(
+ host_impl.active_tree()->animation_host()->RegisterPlayerForElement(
root_ptr->id(), player.get());
host_impl.active_tree()
->animation_host()
- ->GetElementAnimationsForLayerId(root_ptr->id())
+ ->GetElementAnimationsForElementId(root_ptr->id())
->AddAnimation(std::move(animation));
root_ptr->SetOpacity(0);
grandchild_ptr->set_visible_layer_rect(gfx::Rect());
@@ -9081,7 +9081,7 @@ TEST_F(LayerTreeHostCommonTest, SkippingPendingLayerImpl) {
ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr);
EXPECT_EQ(gfx::Rect(10, 10), grandchild_ptr->visible_layer_rect());
- host_impl.active_tree()->animation_host()->UnregisterPlayerForLayer(
+ host_impl.active_tree()->animation_host()->UnregisterPlayerForElement(
root_ptr->id(), player.get());
}
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698