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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index b8d0320047532aa76f872b24fb64b57ee2873c93..e36f6a0b5d4eb9d0353c637ae815f51d7cfe6346 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -130,7 +130,7 @@ class LayerTreeHostAnimationTestAddAnimation
LayerAnimationController* controller =
layer_tree_host()->root_layer()->layer_animation_controller();
- Animation* animation = controller->GetAnimation(Animation::OPACITY);
+ Animation* animation = controller->GetAnimation(Animation::Opacity);
if (animation)
controller->RemoveAnimation(animation->id());
@@ -471,7 +471,8 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
LayerAnimationController* controller_impl =
host_impl->active_tree()->root_layer()->children()[0]->
layer_animation_controller();
- Animation* animation = controller_impl->GetAnimation(Animation::OPACITY);
+ Animation* animation =
+ controller_impl->GetAnimation(Animation::Opacity);
if (!animation)
return;
@@ -522,7 +523,8 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
LayerAnimationController* controller =
layer_tree_host()->root_layer()->children()[0]->
layer_animation_controller();
- Animation* animation = controller->GetAnimation(Animation::OPACITY);
+ Animation* animation =
+ controller->GetAnimation(Animation::Opacity);
main_start_time_ = animation->start_time();
controller->RemoveAnimation(animation->id());
EndTest();
@@ -533,7 +535,8 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
LayerAnimationController* controller =
impl_host->active_tree()->root_layer()->children()[0]->
layer_animation_controller();
- Animation* animation = controller->GetAnimation(Animation::OPACITY);
+ Animation* animation =
+ controller->GetAnimation(Animation::Opacity);
if (!animation)
return;
@@ -570,7 +573,8 @@ class LayerTreeHostAnimationTestAnimationFinishedEvents
int group) override {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->layer_animation_controller();
- Animation* animation = controller->GetAnimation(Animation::OPACITY);
+ Animation* animation =
+ controller->GetAnimation(Animation::Opacity);
if (animation)
controller->RemoveAnimation(animation->id());
EndTest();
@@ -605,7 +609,7 @@ class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity
LayerAnimationController* controller_impl =
host_impl->active_tree()->root_layer()->layer_animation_controller();
Animation* animation_impl =
- controller_impl->GetAnimation(Animation::OPACITY);
+ controller_impl->GetAnimation(Animation::Opacity);
controller_impl->RemoveAnimation(animation_impl->id());
EndTest();
}
@@ -644,7 +648,8 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation
// Any valid AnimationCurve will do here.
scoped_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
scoped_ptr<Animation> animation(
- Animation::Create(curve.Pass(), 1, 1, Animation::OPACITY));
+ Animation::Create(curve.Pass(), 1, 1,
+ Animation::Opacity));
layer->layer_animation_controller()->AddAnimation(animation.Pass());
// We add the animation *before* attaching the layer to the tree.
@@ -981,7 +986,7 @@ class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated
gfx::ScrollOffset(500.f, 550.f),
EaseInOutTimingFunction::Create()));
scoped_ptr<Animation> animation(
- Animation::Create(curve.Pass(), 1, 0, Animation::SCROLL_OFFSET));
+ Animation::Create(curve.Pass(), 1, 0, Animation::ScrollOffset));
animation->set_needs_synchronized_start_time(true);
bool animation_added = scroll_layer_->AddAnimation(animation.Pass());
bool impl_scrolling_supported =
@@ -1031,7 +1036,7 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f),
EaseInOutTimingFunction::Create()));
scoped_ptr<Animation> animation(
- Animation::Create(curve.Pass(), 1, 0, Animation::SCROLL_OFFSET));
+ Animation::Create(curve.Pass(), 1, 0, Animation::ScrollOffset));
animation->set_needs_synchronized_start_time(true);
scroll_layer_->AddAnimation(animation.Pass());
}
@@ -1045,7 +1050,7 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
case 1: {
Animation* animation =
scroll_layer_->layer_animation_controller()->GetAnimation(
- Animation::SCROLL_OFFSET);
+ Animation::ScrollOffset);
scroll_layer_->layer_animation_controller()->RemoveAnimation(
animation->id());
scroll_layer_->SetScrollOffset(final_postion_);
@@ -1075,9 +1080,9 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
host_impl->active_tree()->root_layer()->children()[0];
Animation* animation =
scroll_layer_impl->layer_animation_controller()->GetAnimation(
- Animation::SCROLL_OFFSET);
+ Animation::ScrollOffset);
- if (!animation || animation->run_state() != Animation::RUNNING) {
+ if (!animation || animation->run_state() != Animation::Running) {
host_impl->BlockNotifyReadyToActivateForTesting(false);
return;
}
@@ -1182,20 +1187,20 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers
LayerAnimationController* root_controller_impl =
host_impl->active_tree()->root_layer()->layer_animation_controller();
Animation* root_animation =
- root_controller_impl->GetAnimation(Animation::OPACITY);
- if (!root_animation || root_animation->run_state() != Animation::RUNNING)
+ root_controller_impl->GetAnimation(Animation::Opacity);
+ if (!root_animation || root_animation->run_state() != Animation::Running)
return;
LayerAnimationController* child_controller_impl =
host_impl->active_tree()->root_layer()->children()
[0]->layer_animation_controller();
Animation* child_animation =
- child_controller_impl->GetAnimation(Animation::OPACITY);
- EXPECT_EQ(Animation::RUNNING, child_animation->run_state());
+ child_controller_impl->GetAnimation(Animation::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(Animation::Opacity);
+ root_controller_impl->AbortAnimations(Animation::Transform);
+ child_controller_impl->AbortAnimations(Animation::Opacity);
EndTest();
}
@@ -1252,10 +1257,10 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
++iter) {
int id = ((*iter).second->id());
if (id == host_impl->RootLayer()->id()) {
- Animation* anim = (*iter).second->GetAnimation(Animation::TRANSFORM);
+ Animation* anim = (*iter).second->GetAnimation(Animation::Transform);
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
} else if (id == host_impl->RootLayer()->children()[0]->id()) {
- Animation* anim = (*iter).second->GetAnimation(Animation::OPACITY);
+ Animation* anim = (*iter).second->GetAnimation(Animation::Opacity);
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
}
}
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698