Index: cc/animation/animation_player.cc |
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc |
index c237aa7fb8b17f5f7172f29d57d23a54ecdcb517..dee19eabdd1e97f9292b55be16af959c8c296acd 100644 |
--- a/cc/animation/animation_player.cc |
+++ b/cc/animation/animation_player.cc |
@@ -154,15 +154,12 @@ void AnimationPlayer::RemoveAnimation(int animation_id) { |
} |
void AnimationPlayer::PushPropertiesTo(AnimationPlayer* player_impl) { |
- if (!element_animations_) { |
- if (player_impl->element_animations()) |
+ if (layer_id_ != player_impl->layer_id()) { |
+ if (player_impl->layer_id()) |
player_impl->DetachLayer(); |
- return; |
+ if (layer_id_) |
+ player_impl->AttachLayer(layer_id_); |
} |
- |
- DCHECK(layer_id_); |
- if (!player_impl->element_animations()) |
- player_impl->AttachLayer(layer_id_); |
} |
void AnimationPlayer::NotifyAnimationStarted( |