| Index: cc/animation/layer_animation_controller.cc
|
| diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
|
| index acc16d3116423495f328adb52ceba01741277792..d75134336587a08e546f0356de973442bd5c38d4 100644
|
| --- a/cc/animation/layer_animation_controller.cc
|
| +++ b/cc/animation/layer_animation_controller.cc
|
| @@ -720,11 +720,19 @@ void LayerAnimationController::TickAnimations(double monotonic_time) {
|
| void LayerAnimationController::UpdateActivation(UpdateActivationType type) {
|
| bool force = type == ForceActivation;
|
| if (registrar_) {
|
| - if (!active_animations_.empty() && (!is_active_ || force))
|
| + bool was_active = is_active_;
|
| + is_active_ = false;
|
| + for (size_t i = 0; i < active_animations_.size(); ++i) {
|
| + if (active_animations_[i]->run_state() != Animation::WaitingForDeletion) {
|
| + is_active_ = true;
|
| + break;
|
| + }
|
| + }
|
| +
|
| + if (is_active_ && (!was_active || force))
|
| registrar_->DidActivateAnimationController(this);
|
| - else if (active_animations_.empty() && (is_active_ || force))
|
| + else if (!is_active_ && (was_active || force))
|
| registrar_->DidDeactivateAnimationController(this);
|
| - is_active_ = !active_animations_.empty();
|
| }
|
| }
|
|
|
|
|