OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/layer_animator.h" | 5 #include "ui/compositor/layer_animator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void LayerAnimator::AddThreadedAnimation( | 212 void LayerAnimator::AddThreadedAnimation( |
213 std::unique_ptr<cc::Animation> animation) { | 213 std::unique_ptr<cc::Animation> animation) { |
214 animation_player_->AddAnimation(std::move(animation)); | 214 animation_player_->AddAnimation(std::move(animation)); |
215 } | 215 } |
216 | 216 |
217 void LayerAnimator::RemoveThreadedAnimation(int animation_id) { | 217 void LayerAnimator::RemoveThreadedAnimation(int animation_id) { |
218 animation_player_->RemoveAnimation(animation_id); | 218 animation_player_->RemoveAnimation(animation_id); |
219 } | 219 } |
220 | 220 |
221 bool LayerAnimator::HasPendingThreadedAnimationsForTesting() const { | 221 bool LayerAnimator::HasPendingThreadedAnimationsForTesting() const { |
222 return animation_player_->has_pending_animations_for_testing(); | 222 return animation_player_->has_any_animation(); |
223 } | 223 } |
224 | 224 |
225 cc::AnimationPlayer* LayerAnimator::GetAnimationPlayerForTesting() const { | 225 cc::AnimationPlayer* LayerAnimator::GetAnimationPlayerForTesting() const { |
226 return animation_player_.get(); | 226 return animation_player_.get(); |
227 } | 227 } |
228 | 228 |
229 void LayerAnimator::StartAnimation(LayerAnimationSequence* animation) { | 229 void LayerAnimator::StartAnimation(LayerAnimationSequence* animation) { |
230 scoped_refptr<LayerAnimator> retain(this); | 230 scoped_refptr<LayerAnimator> retain(this); |
231 OnScheduled(animation); | 231 OnScheduled(animation); |
232 if (!StartSequenceImmediately(animation)) { | 232 if (!StartSequenceImmediately(animation)) { |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 const base::WeakPtr<LayerAnimationSequence>& sequence) | 967 const base::WeakPtr<LayerAnimationSequence>& sequence) |
968 : sequence_(sequence) { | 968 : sequence_(sequence) { |
969 } | 969 } |
970 | 970 |
971 LayerAnimator::RunningAnimation::RunningAnimation( | 971 LayerAnimator::RunningAnimation::RunningAnimation( |
972 const RunningAnimation& other) = default; | 972 const RunningAnimation& other) = default; |
973 | 973 |
974 LayerAnimator::RunningAnimation::~RunningAnimation() { } | 974 LayerAnimator::RunningAnimation::~RunningAnimation() { } |
975 | 975 |
976 } // namespace ui | 976 } // namespace ui |
OLD | NEW |