Index: ui/compositor/layer_animator.cc |
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc |
index 98261fe539e1e287eb62f6cedcd082f70cc12c8a..71cb0ca7b7acb8d2d5c165a94e76a03d772075a7 100644 |
--- a/ui/compositor/layer_animator.cc |
+++ b/ui/compositor/layer_animator.cc |
@@ -86,6 +86,14 @@ LayerAnimator* LayerAnimator::CreateImplicitAnimator() { |
base::TimeDelta::FromMilliseconds(kDefaultTransitionDurationMs)); |
} |
+// static |
+scoped_ptr<test::AnimationContainerTestHelper> |
+LayerAnimator::CreateAnimatorHelperForTest() { |
+ scoped_ptr<test::AnimationContainerTestHelper> result; |
+ result.reset(new test::AnimationContainerTestHelper(GetAnimationContainer())); |
+ return result.Pass(); |
+} |
+ |
// This macro provides the implementation for the setter and getter (well, |
// the getter of the target value) for an animated property. For example, |
// it is used for the implementations of SetTransform and GetTargetTransform. |
@@ -183,7 +191,7 @@ void LayerAnimator::StartTogether( |
if (GetAnimationContainer()->is_running()) |
last_step_time_ = GetAnimationContainer()->last_tick_time(); |
else |
- last_step_time_ = base::TimeTicks::Now(); |
+ last_step_time_ = GetAnimationContainer()->GetCurrentTime(); |
} |
// Collect all the affected properties. |
@@ -678,7 +686,7 @@ bool LayerAnimator::StartSequenceImmediately(LayerAnimationSequence* sequence) { |
else if (GetAnimationContainer()->is_running()) |
start_time = GetAnimationContainer()->last_tick_time(); |
else |
- start_time = base::TimeTicks::Now(); |
+ start_time = GetAnimationContainer()->GetCurrentTime(); |
running_animations_.push_back( |
RunningAnimation(sequence->AsWeakPtr(), start_time)); |