Index: cc/animation/layer_animation_controller.cc |
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc |
index e6e720f2f230e373505274baf918cff3690fb4c7..ff7b5ea7e36689e158d8d925cfe315d0ee6165fc 100644 |
--- a/cc/animation/layer_animation_controller.cc |
+++ b/cc/animation/layer_animation_controller.cc |
@@ -810,7 +810,9 @@ void LayerAnimationController::MarkAnimationsForDeletion( |
// on the impl thread, we only mark a FINISHED main thread animation for |
// deletion once it has received a FINISHED event from the impl thread. |
bool animation_i_will_send_or_has_received_finish_event = |
- events || animations_[i]->received_finished_event(); |
+ animations_[i]->is_controlling_instance() || |
+ animations_[i]->is_impl_only() || |
+ animations_[i]->received_finished_event(); |
// If an animation is finished, and not already marked for deletion, |
// find out if all other animations in the same group are also finished. |
if (animations_[i]->run_state() == Animation::FINISHED && |
@@ -822,7 +824,9 @@ void LayerAnimationController::MarkAnimationsForDeletion( |
all_anims_with_same_id_are_finished = true; |
for (size_t j = 0; j < animations_.size(); ++j) { |
bool animation_j_will_send_or_has_received_finish_event = |
- events || animations_[j]->received_finished_event(); |
+ animations_[j]->is_controlling_instance() || |
+ animations_[j]->is_impl_only() || |
+ animations_[j]->received_finished_event(); |
if (group_id == animations_[j]->group()) { |
if (!animations_[j]->is_finished() || |
(animations_[j]->run_state() == Animation::FINISHED && |