Index: cc/trees/layer_tree_host_unittest_animation_timelines.cc |
diff --git a/cc/trees/layer_tree_host_unittest_animation_timelines.cc b/cc/trees/layer_tree_host_unittest_animation_timelines.cc |
index 1c62e373cbc68daef1f9c543d39c5b181952e0c0..634d4448cbe1f0903df9263e64c6c5cba3a2648c 100644 |
--- a/cc/trees/layer_tree_host_unittest_animation_timelines.cc |
+++ b/cc/trees/layer_tree_host_unittest_animation_timelines.cc |
@@ -87,13 +87,14 @@ class LayerTreeHostTimelinesTestAddAnimation |
} |
void NotifyAnimationStarted(base::TimeTicks monotonic_time, |
- Animation::TargetProperty target_property, |
+ AnimationTargetProperty target_property, |
int group) override { |
EXPECT_LT(base::TimeTicks(), monotonic_time); |
LayerAnimationController* controller = |
player_->element_animations()->layer_animation_controller(); |
- Animation* animation = controller->GetAnimation(Animation::OPACITY); |
+ Animation* animation = |
+ controller->GetAnimation(AnimationTargetProperty::OPACITY); |
if (animation) |
player_->RemoveAnimation(animation->id()); |
@@ -178,7 +179,7 @@ class LayerTreeHostTimelinesTestAnimationsGetDeleted |
} |
void NotifyAnimationFinished(base::TimeTicks monotonic_time, |
- Animation::TargetProperty target_property, |
+ AnimationTargetProperty target_property, |
int group) override { |
// Animations on the impl-side controller only get deleted during a commit, |
// so we need to schedule a commit. |
@@ -228,7 +229,8 @@ class LayerTreeHostTimelinesTestAddAnimationWithTimingFunction |
LayerAnimationController* controller_impl = |
player_child_impl->element_animations()->layer_animation_controller(); |
- Animation* animation = controller_impl->GetAnimation(Animation::OPACITY); |
+ Animation* animation = |
+ controller_impl->GetAnimation(AnimationTargetProperty::OPACITY); |
const FloatAnimationCurve* curve = |
animation->curve()->ToFloatAnimationCurve(); |
@@ -280,11 +282,12 @@ class LayerTreeHostTimelinesTestSynchronizeAnimationStartTimes |
} |
void NotifyAnimationStarted(base::TimeTicks monotonic_time, |
- Animation::TargetProperty target_property, |
+ AnimationTargetProperty target_property, |
int group) override { |
LayerAnimationController* controller = |
player_child_->element_animations()->layer_animation_controller(); |
- Animation* animation = controller->GetAnimation(Animation::OPACITY); |
+ Animation* animation = |
+ controller->GetAnimation(AnimationTargetProperty::OPACITY); |
main_start_time_ = animation->start_time(); |
controller->RemoveAnimation(animation->id()); |
EndTest(); |
@@ -299,7 +302,8 @@ class LayerTreeHostTimelinesTestSynchronizeAnimationStartTimes |
LayerAnimationController* controller = |
player_child_impl->element_animations()->layer_animation_controller(); |
- Animation* animation = controller->GetAnimation(Animation::OPACITY); |
+ Animation* animation = |
+ controller->GetAnimation(AnimationTargetProperty::OPACITY); |
if (!animation) |
return; |
@@ -335,11 +339,12 @@ class LayerTreeHostTimelinesTestAnimationFinishedEvents |
} |
void NotifyAnimationFinished(base::TimeTicks monotonic_time, |
- Animation::TargetProperty target_property, |
+ AnimationTargetProperty target_property, |
int group) override { |
LayerAnimationController* controller = |
player_->element_animations()->layer_animation_controller(); |
- Animation* animation = controller->GetAnimation(Animation::OPACITY); |
+ Animation* animation = |
+ controller->GetAnimation(AnimationTargetProperty::OPACITY); |
if (animation) |
controller->RemoveAnimation(animation->id()); |
EndTest(); |
@@ -384,7 +389,7 @@ class LayerTreeHostTimelinesTestDoNotSkipLayersWithAnimatedOpacity |
LayerAnimationController* controller_impl = |
player_impl->element_animations()->layer_animation_controller(); |
Animation* animation_impl = |
- controller_impl->GetAnimation(Animation::OPACITY); |
+ controller_impl->GetAnimation(AnimationTargetProperty::OPACITY); |
controller_impl->RemoveAnimation(animation_impl->id()); |
EndTest(); |
} |
@@ -426,8 +431,8 @@ class LayerTreeHostTimelinesTestLayerAddedWithAnimation |
// Any valid AnimationCurve will do here. |
scoped_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve()); |
- scoped_ptr<Animation> animation( |
- Animation::Create(std::move(curve), 1, 1, Animation::OPACITY)); |
+ scoped_ptr<Animation> animation(Animation::Create( |
+ std::move(curve), 1, 1, AnimationTargetProperty::OPACITY)); |
player_->AddAnimation(std::move(animation)); |
// We add the animation *before* attaching the layer to the tree. |
@@ -507,7 +512,7 @@ class LayerTreeHostTimelinesTestCheckerboardDoesntStartAnimations |
} |
void NotifyAnimationStarted(base::TimeTicks monotonic_time, |
- Animation::TargetProperty target_property, |
+ AnimationTargetProperty target_property, |
int group) override { |
if (TestEnded()) |
return; |
@@ -564,7 +569,7 @@ class LayerTreeHostTimelinesTestScrollOffsetChangesArePropagated |
gfx::ScrollOffset(500.f, 550.f), |
EaseInOutTimingFunction::Create())); |
scoped_ptr<Animation> animation(Animation::Create( |
- std::move(curve), 1, 0, Animation::SCROLL_OFFSET)); |
+ std::move(curve), 1, 0, AnimationTargetProperty::SCROLL_OFFSET)); |
animation->set_needs_synchronized_start_time(true); |
bool impl_scrolling_supported = |
layer_tree_host()->proxy()->SupportsImplScrolling(); |
@@ -615,8 +620,8 @@ class LayerTreeHostTimelinesTestScrollOffsetAnimationRemoval |
scoped_ptr<ScrollOffsetAnimationCurve> curve( |
ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f), |
EaseInOutTimingFunction::Create())); |
- scoped_ptr<Animation> animation( |
- Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET)); |
+ scoped_ptr<Animation> animation(Animation::Create( |
+ std::move(curve), 1, 0, AnimationTargetProperty::SCROLL_OFFSET)); |
animation->set_needs_synchronized_start_time(true); |
AttachPlayersToTimeline(); |
@@ -631,9 +636,10 @@ class LayerTreeHostTimelinesTestScrollOffsetAnimationRemoval |
case 0: |
break; |
case 1: { |
- Animation* animation = player_child_->element_animations() |
- ->layer_animation_controller() |
- ->GetAnimation(Animation::SCROLL_OFFSET); |
+ Animation* animation = |
+ player_child_->element_animations() |
+ ->layer_animation_controller() |
+ ->GetAnimation(AnimationTargetProperty::SCROLL_OFFSET); |
player_child_->RemoveAnimation(animation->id()); |
scroll_layer_->SetScrollOffset(final_postion_); |
break; |
@@ -664,9 +670,10 @@ class LayerTreeHostTimelinesTestScrollOffsetAnimationRemoval |
LayerImpl* scroll_layer_impl = |
host_impl->active_tree()->root_layer()->children()[0].get(); |
- Animation* animation = player_impl->element_animations() |
- ->layer_animation_controller() |
- ->GetAnimation(Animation::SCROLL_OFFSET); |
+ Animation* animation = |
+ player_impl->element_animations() |
+ ->layer_animation_controller() |
+ ->GetAnimation(AnimationTargetProperty::SCROLL_OFFSET); |
if (!animation || animation->run_state() != Animation::RUNNING) { |
host_impl->BlockNotifyReadyToActivateForTesting(false); |
@@ -785,19 +792,19 @@ class LayerTreeHostTimelinesTestAnimationsAddedToNewAndExistingLayers |
LayerAnimationController* root_controller_impl = |
player_impl->element_animations()->layer_animation_controller(); |
Animation* root_animation = |
- root_controller_impl->GetAnimation(Animation::OPACITY); |
+ root_controller_impl->GetAnimation(AnimationTargetProperty::OPACITY); |
if (!root_animation || root_animation->run_state() != Animation::RUNNING) |
return; |
LayerAnimationController* child_controller_impl = |
player_child_impl->element_animations()->layer_animation_controller(); |
Animation* child_animation = |
- child_controller_impl->GetAnimation(Animation::OPACITY); |
+ child_controller_impl->GetAnimation(AnimationTargetProperty::OPACITY); |
EXPECT_EQ(Animation::RUNNING, child_animation->run_state()); |
EXPECT_EQ(root_animation->start_time(), child_animation->start_time()); |
- root_controller_impl->AbortAnimations(Animation::OPACITY); |
- root_controller_impl->AbortAnimations(Animation::TRANSFORM); |
- child_controller_impl->AbortAnimations(Animation::OPACITY); |
+ root_controller_impl->AbortAnimations(AnimationTargetProperty::OPACITY); |
+ root_controller_impl->AbortAnimations(AnimationTargetProperty::TRANSFORM); |
+ child_controller_impl->AbortAnimations(AnimationTargetProperty::OPACITY); |
EndTest(); |
} |
@@ -856,10 +863,12 @@ class LayerTreeHostTimelinesTestAddAnimationAfterAnimating |
for (auto& it : controllers_copy) { |
int id = it.first; |
if (id == host_impl->RootLayer()->id()) { |
- Animation* anim = it.second->GetAnimation(Animation::TRANSFORM); |
+ Animation* anim = |
+ it.second->GetAnimation(AnimationTargetProperty::TRANSFORM); |
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0); |
} else if (id == host_impl->RootLayer()->children()[0]->id()) { |
- Animation* anim = it.second->GetAnimation(Animation::OPACITY); |
+ Animation* anim = |
+ it.second->GetAnimation(AnimationTargetProperty::OPACITY); |
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0); |
} |
EndTest(); |
@@ -901,7 +910,8 @@ class LayerTreeHostTimelinesTestRemoveAnimation |
case 2: |
LayerAnimationController* controller = |
player_child_->element_animations()->layer_animation_controller(); |
- Animation* animation = controller->GetAnimation(Animation::TRANSFORM); |
+ Animation* animation = |
+ controller->GetAnimation(AnimationTargetProperty::TRANSFORM); |
player_child_->RemoveAnimation(animation->id()); |
gfx::Transform transform; |
transform.Translate(10.f, 10.f); |