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

Unified Diff: cc/animation/layer_animation_controller.cc

Issue 1151763011: Fix assumptions made in LAC::MarkAnimationsForDeletion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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/animation/animation.h ('k') | cc/animation/layer_animation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &&
« no previous file with comments | « cc/animation/animation.h ('k') | cc/animation/layer_animation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698