| Index: cc/animation/animation_player.cc
|
| diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
|
| index dd57cade867919dd604bfa673e986f86baab6078..d77e1de677395b4d51ccd15fc0d4b23e9d3ec685 100644
|
| --- a/cc/animation/animation_player.cc
|
| +++ b/cc/animation/animation_player.cc
|
| @@ -253,7 +253,7 @@ void AnimationPlayer::PushPropertiesTo(AnimationPlayer* player_impl) {
|
| return;
|
|
|
| MarkAbortedAnimationsForDeletion(player_impl);
|
| - PurgeAnimationsMarkedForDeletion();
|
| + PurgeAnimationsMarkedForDeletion(/* impl_only */ false);
|
| PushNewAnimationsToImplThread(player_impl);
|
|
|
| // Remove finished impl side animations only after pushing,
|
| @@ -298,6 +298,7 @@ void AnimationPlayer::UpdateState(bool start_ready_animations,
|
|
|
| MarkFinishedAnimations(last_tick_time_);
|
| MarkAnimationsForDeletion(last_tick_time_, events);
|
| + PurgeAnimationsMarkedForDeletion(/* impl_only */ true);
|
|
|
| if (start_ready_animations) {
|
| if (needs_to_start_animations()) {
|
| @@ -1097,10 +1098,12 @@ void AnimationPlayer::MarkAbortedAnimationsForDeletion(
|
| element_animations_->SetNeedsUpdateImplClientState();
|
| }
|
|
|
| -void AnimationPlayer::PurgeAnimationsMarkedForDeletion() {
|
| - base::EraseIf(animations_, [](const std::unique_ptr<Animation>& animation) {
|
| - return animation->run_state() == Animation::WAITING_FOR_DELETION;
|
| - });
|
| +void AnimationPlayer::PurgeAnimationsMarkedForDeletion(bool impl_only) {
|
| + base::EraseIf(
|
| + animations_, [impl_only](const std::unique_ptr<Animation>& animation) {
|
| + return animation->run_state() == Animation::WAITING_FOR_DELETION &&
|
| + (!impl_only || animation->is_impl_only());
|
| + });
|
| }
|
|
|
| void AnimationPlayer::PushNewAnimationsToImplThread(
|
|
|