Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: ui/compositor/layer_animator.cc

Issue 2322693003: CC Animation: Rename has_any_animation and make implementattion out-of-line (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/animation/element_animations_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/animation/element_animations_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698