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

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

Issue 1749573002: CC Animation: Erase old animation system in UI Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseblink
Patch Set: Exclude histograms.xml Created 4 years, 9 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 | « ui/compositor/layer.cc ('k') | ui/compositor/layer_owner_unittest.cc » ('j') | 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 "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 LayerAnimator::LayerAnimator(base::TimeDelta transition_duration) 48 LayerAnimator::LayerAnimator(base::TimeDelta transition_duration)
49 : delegate_(NULL), 49 : delegate_(NULL),
50 preemption_strategy_(IMMEDIATELY_SET_NEW_TARGET), 50 preemption_strategy_(IMMEDIATELY_SET_NEW_TARGET),
51 is_transition_duration_locked_(false), 51 is_transition_duration_locked_(false),
52 transition_duration_(transition_duration), 52 transition_duration_(transition_duration),
53 tween_type_(gfx::Tween::LINEAR), 53 tween_type_(gfx::Tween::LINEAR),
54 is_started_(false), 54 is_started_(false),
55 disable_timer_for_test_(false), 55 disable_timer_for_test_(false),
56 adding_animations_(false) { 56 adding_animations_(false) {
57 if (Layer::UILayerSettings().use_compositor_animation_timelines) { 57 animation_player_ =
58 animation_player_ = 58 cc::AnimationPlayer::Create(cc::AnimationIdProvider::NextPlayerId());
59 cc::AnimationPlayer::Create(cc::AnimationIdProvider::NextPlayerId());
60 }
61 } 59 }
62 60
63 LayerAnimator::~LayerAnimator() { 61 LayerAnimator::~LayerAnimator() {
64 for (size_t i = 0; i < running_animations_.size(); ++i) { 62 for (size_t i = 0; i < running_animations_.size(); ++i) {
65 if (running_animations_[i].is_sequence_alive()) 63 if (running_animations_[i].is_sequence_alive())
66 running_animations_[i].sequence()->OnAnimatorDestroyed(); 64 running_animations_[i].sequence()->OnAnimatorDestroyed();
67 } 65 }
68 ClearAnimationsInternal(); 66 ClearAnimationsInternal();
69 delegate_ = NULL; 67 delegate_ = NULL;
70 DCHECK(!animation_player_ || !animation_player_->animation_timeline()); 68 DCHECK(!animation_player_ || !animation_player_->animation_timeline());
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 const base::WeakPtr<LayerAnimationSequence>& sequence) 954 const base::WeakPtr<LayerAnimationSequence>& sequence)
957 : sequence_(sequence) { 955 : sequence_(sequence) {
958 } 956 }
959 957
960 LayerAnimator::RunningAnimation::RunningAnimation( 958 LayerAnimator::RunningAnimation::RunningAnimation(
961 const RunningAnimation& other) = default; 959 const RunningAnimation& other) = default;
962 960
963 LayerAnimator::RunningAnimation::~RunningAnimation() { } 961 LayerAnimator::RunningAnimation::~RunningAnimation() { }
964 962
965 } // namespace ui 963 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/layer_owner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698