| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/animation/animation_player.h" | 5 #include "cc/animation/animation_player.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_delegate.h" | 7 #include "cc/animation/animation_delegate.h" |
| 8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
| 9 #include "cc/animation/animation_timeline.h" | 9 #include "cc/animation/animation_timeline.h" |
| 10 #include "cc/animation/element_animations.h" | 10 #include "cc/animation/element_animations.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 element_animations_(), | 22 element_animations_(), |
| 23 layer_animation_delegate_(), | 23 layer_animation_delegate_(), |
| 24 id_(id), | 24 id_(id), |
| 25 layer_id_(0) { | 25 layer_id_(0) { |
| 26 DCHECK(id_); | 26 DCHECK(id_); |
| 27 } | 27 } |
| 28 | 28 |
| 29 AnimationPlayer::~AnimationPlayer() { | 29 AnimationPlayer::~AnimationPlayer() { |
| 30 DCHECK(!animation_timeline_); | 30 DCHECK(!animation_timeline_); |
| 31 DCHECK(!element_animations_); | 31 DCHECK(!element_animations_); |
| 32 DCHECK(!layer_id_); | |
| 33 } | 32 } |
| 34 | 33 |
| 35 scoped_refptr<AnimationPlayer> AnimationPlayer::CreateImplInstance() const { | 34 scoped_refptr<AnimationPlayer> AnimationPlayer::CreateImplInstance() const { |
| 36 scoped_refptr<AnimationPlayer> player = AnimationPlayer::Create(id()); | 35 scoped_refptr<AnimationPlayer> player = AnimationPlayer::Create(id()); |
| 37 return player; | 36 return player; |
| 38 } | 37 } |
| 39 | 38 |
| 40 void AnimationPlayer::SetAnimationHost(AnimationHost* animation_host) { | 39 void AnimationPlayer::SetAnimationHost(AnimationHost* animation_host) { |
| 41 animation_host_ = animation_host; | 40 animation_host_ = animation_host; |
| 42 } | 41 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 target_property, group); | 179 target_property, group); |
| 181 } | 180 } |
| 182 | 181 |
| 183 void AnimationPlayer::SetNeedsCommit() { | 182 void AnimationPlayer::SetNeedsCommit() { |
| 184 DCHECK(animation_host_); | 183 DCHECK(animation_host_); |
| 185 animation_host_->SetNeedsCommit(); | 184 animation_host_->SetNeedsCommit(); |
| 186 animation_host_->SetNeedsRebuildPropertyTrees(); | 185 animation_host_->SetNeedsRebuildPropertyTrees(); |
| 187 } | 186 } |
| 188 | 187 |
| 189 } // namespace cc | 188 } // namespace cc |
| OLD | NEW |