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

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

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: Merge branch 'master' into secondaryid Created 3 years, 7 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') | 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 cc::AnimationTimeline* timeline = compositor->GetAnimationTimeline(); 160 cc::AnimationTimeline* timeline = compositor->GetAnimationTimeline();
161 DCHECK(timeline); 161 DCHECK(timeline);
162 162
163 DetachLayerFromAnimationPlayer(); 163 DetachLayerFromAnimationPlayer();
164 timeline->DetachPlayer(animation_player_); 164 timeline->DetachPlayer(animation_player_);
165 } 165 }
166 166
167 void LayerAnimator::AttachLayerToAnimationPlayer(int layer_id) { 167 void LayerAnimator::AttachLayerToAnimationPlayer(int layer_id) {
168 // For ui, layer and element ids are equivalent. 168 // For ui, layer and element ids are equivalent.
169 cc::ElementId element_id(layer_id, 0); 169 cc::ElementId element_id(layer_id);
170 if (!animation_player_->element_id()) 170 if (!animation_player_->element_id())
171 animation_player_->AttachElement(element_id); 171 animation_player_->AttachElement(element_id);
172 else 172 else
173 DCHECK_EQ(animation_player_->element_id(), element_id); 173 DCHECK_EQ(animation_player_->element_id(), element_id);
174 174
175 animation_player_->set_animation_delegate(this); 175 animation_player_->set_animation_delegate(this);
176 } 176 }
177 177
178 void LayerAnimator::DetachLayerFromAnimationPlayer() { 178 void LayerAnimator::DetachLayerFromAnimationPlayer() {
179 animation_player_->set_animation_delegate(nullptr); 179 animation_player_->set_animation_delegate(nullptr);
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 const base::WeakPtr<LayerAnimationSequence>& sequence) 935 const base::WeakPtr<LayerAnimationSequence>& sequence)
936 : sequence_(sequence) { 936 : sequence_(sequence) {
937 } 937 }
938 938
939 LayerAnimator::RunningAnimation::RunningAnimation( 939 LayerAnimator::RunningAnimation::RunningAnimation(
940 const RunningAnimation& other) = default; 940 const RunningAnimation& other) = default;
941 941
942 LayerAnimator::RunningAnimation::~RunningAnimation() { } 942 LayerAnimator::RunningAnimation::~RunningAnimation() { }
943 943
944 } // namespace ui 944 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698