| Index: cc/animation/layer_animation_controller.cc
|
| diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
|
| index b779a37957a8d165d517e611f0ee37da334bc963..f621ad318c4d5470442b842be7fee9ab4eee0333 100644
|
| --- a/cc/animation/layer_animation_controller.cc
|
| +++ b/cc/animation/layer_animation_controller.cc
|
| @@ -148,7 +148,8 @@ void LayerAnimationController::AccumulatePropertyUpdates(
|
| if (!animation->InEffect(monotonic_time))
|
| continue;
|
|
|
| - double trimmed = animation->TrimTimeToCurrentIteration(monotonic_time);
|
| + double trimmed =
|
| + animation->TrimTimeToCurrentIteration(monotonic_time).InSecondsF();
|
| switch (animation->target_property()) {
|
| case Animation::Opacity: {
|
| AnimationEvent event(AnimationEvent::PropertyUpdate,
|
| @@ -212,7 +213,11 @@ void LayerAnimationController::UpdateState(bool start_ready_animations,
|
| if (!HasActiveValueObserver())
|
| return;
|
|
|
| - DCHECK(last_tick_time_ != base::TimeTicks());
|
| + // Animate hasn't been called, this happens if an observer has been added
|
| + // between the Commit and Draw phases.
|
| + if (last_tick_time_ == base::TimeTicks())
|
| + return;
|
| +
|
| if (start_ready_animations)
|
| PromoteStartedAnimations(last_tick_time_, events);
|
|
|
| @@ -856,8 +861,9 @@ void LayerAnimationController::TickAnimations(base::TimeTicks monotonic_time) {
|
| if (!animations_[i]->InEffect(monotonic_time))
|
| continue;
|
|
|
| - double trimmed =
|
| - animations_[i]->TrimTimeToCurrentIteration(monotonic_time);
|
| + double trimmed = animations_[i]
|
| + ->TrimTimeToCurrentIteration(monotonic_time)
|
| + .InSecondsF();
|
|
|
| switch (animations_[i]->target_property()) {
|
| case Animation::Transform: {
|
|
|