| Index: cc/animation/animation_player.cc
|
| diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
|
| index af11dfc2c683ac09c409c7594327dd95757e4f55..d18f76884698caa7152a8d0ed9fd58237a570e2c 100644
|
| --- a/cc/animation/animation_player.cc
|
| +++ b/cc/animation/animation_player.cc
|
| @@ -252,7 +252,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,
|
| @@ -297,6 +297,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()) {
|
| @@ -1098,12 +1099,13 @@ void AnimationPlayer::MarkAbortedAnimationsForDeletion(
|
| element_animations_->SetNeedsUpdateImplClientState();
|
| }
|
|
|
| -void AnimationPlayer::PurgeAnimationsMarkedForDeletion() {
|
| +void AnimationPlayer::PurgeAnimationsMarkedForDeletion(bool impl_only) {
|
| animations_.erase(
|
| std::remove_if(animations_.begin(), animations_.end(),
|
| - [](const std::unique_ptr<Animation>& animation) {
|
| + [impl_only](const std::unique_ptr<Animation>& animation) {
|
| return animation->run_state() ==
|
| - Animation::WAITING_FOR_DELETION;
|
| + Animation::WAITING_FOR_DELETION &&
|
| + (!impl_only || animation->is_impl_only());
|
| }),
|
| animations_.end());
|
| }
|
|
|