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

Unified Diff: cc/layer_tree_host_unittest_animation.cc

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/layer_tree_host_impl.cc ('k') | cc/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/layer_tree_host_unittest_animation.cc
diff --git a/cc/layer_tree_host_unittest_animation.cc b/cc/layer_tree_host_unittest_animation.cc
index 8a8d92f6fc62b0f741c1759ebde65747c10829da..67af501d2cc22555cb5dfd11677c19868801b737 100644
--- a/cc/layer_tree_host_unittest_animation.cc
+++ b/cc/layer_tree_host_unittest_animation.cc
@@ -254,29 +254,29 @@ public:
LayerAnimationController* controller =
m_layerTreeHost->rootLayer()->layerAnimationController();
Animation* animation =
- controller->getAnimation(0, Animation::Opacity);
+ controller->GetAnimation(0, Animation::Opacity);
if (!animation)
return;
const FloatAnimationCurve* curve =
- animation->curve()->toFloatAnimationCurve();
- float startOpacity = curve->getValue(0);
- float endOpacity = curve->getValue(curve->duration());
+ animation->curve()->ToFloatAnimationCurve();
+ float startOpacity = curve->GetValue(0);
+ float endOpacity = curve->GetValue(curve->Duration());
float linearly_interpolated_opacity =
0.25 * endOpacity + 0.75 * startOpacity;
- double time = curve->duration() * 0.25;
+ double time = curve->Duration() * 0.25;
// If the linear timing function associated with this animation was not
// picked up, then the linearly interpolated opacity would be different
// because of the default ease timing function.
- EXPECT_FLOAT_EQ(linearly_interpolated_opacity, curve->getValue(time));
+ EXPECT_FLOAT_EQ(linearly_interpolated_opacity, curve->GetValue(time));
LayerAnimationController* controller_impl =
host_impl->rootLayer()->layerAnimationController();
Animation* animation_impl =
- controller_impl->getAnimation(0, Animation::Opacity);
+ controller_impl->GetAnimation(0, Animation::Opacity);
- controller->removeAnimation(animation->id());
- controller_impl->removeAnimation(animation_impl->id());
+ controller->RemoveAnimation(animation->id());
+ controller_impl->RemoveAnimation(animation_impl->id());
endTest();
}
@@ -304,9 +304,9 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes :
LayerAnimationController* controller =
m_layerTreeHost->rootLayer()->layerAnimationController();
Animation* animation =
- controller->getAnimation(0, Animation::Opacity);
- main_start_time_ = animation->startTime();
- controller->removeAnimation(animation->id());
+ controller->GetAnimation(0, Animation::Opacity);
+ main_start_time_ = animation->start_time();
+ controller->RemoveAnimation(animation->id());
if (impl_start_time_ > 0)
endTest();
@@ -318,12 +318,12 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes :
LayerAnimationController* controller =
impl_host->rootLayer()->layerAnimationController();
Animation* animation =
- controller->getAnimation(0, Animation::Opacity);
+ controller->GetAnimation(0, Animation::Opacity);
if (!animation)
return;
- impl_start_time_ = animation->startTime();
- controller->removeAnimation(animation->id());
+ impl_start_time_ = animation->start_time();
+ controller->RemoveAnimation(animation->id());
if (main_start_time_ > 0)
endTest();
@@ -354,9 +354,9 @@ class LayerTreeHostAnimationTestAnimationFinishedEvents :
LayerAnimationController* controller =
m_layerTreeHost->rootLayer()->layerAnimationController();
Animation* animation =
- controller->getAnimation(0, Animation::Opacity);
+ controller->GetAnimation(0, Animation::Opacity);
if (animation)
- controller->removeAnimation(animation->id());
+ controller->RemoveAnimation(animation->id());
endTest();
}
@@ -425,9 +425,9 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation :
// Any valid AnimationCurve will do here.
scoped_ptr<AnimationCurve> curve(EaseTimingFunction::create());
scoped_ptr<Animation> animation(
- Animation::create(curve.Pass(), 1, 1,
+ Animation::Create(curve.Pass(), 1, 1,
Animation::Opacity));
- layer->layerAnimationController()->addAnimation(animation.Pass());
+ layer->layerAnimationController()->AddAnimation(animation.Pass());
// We add the animation *before* attaching the layer to the tree.
m_layerTreeHost->rootLayer()->addChild(layer);
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698