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

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

Issue 1921583003: CC Animation: Let MutatorHostClient deals with elements instead of layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@elementid
Patch Set: Rename methods in ElementAnimations Created 4 years, 8 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/trees/mutator_host_client.h ('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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 cc::AnimationTimeline* timeline = compositor->GetAnimationTimeline(); 176 cc::AnimationTimeline* timeline = compositor->GetAnimationTimeline();
177 DCHECK(timeline); 177 DCHECK(timeline);
178 178
179 const int layer_id = animation_player_->element_id(); 179 const int layer_id = animation_player_->element_id();
180 180
181 // Store a reference to ElementAnimations (if any) 181 // Store a reference to ElementAnimations (if any)
182 // so it may be picked up in LayerAnimator::SetCompositor. 182 // so it may be picked up in LayerAnimator::SetCompositor.
183 if (layer_id) { 183 if (layer_id) {
184 element_animations_state_ = 184 element_animations_state_ =
185 timeline->animation_host()->GetElementAnimationsForLayerId(layer_id); 185 timeline->animation_host()->GetElementAnimationsForElementId(layer_id);
186 } 186 }
187 187
188 DetachLayerFromAnimationPlayer(); 188 DetachLayerFromAnimationPlayer();
189 189
190 timeline->DetachPlayer(animation_player_); 190 timeline->DetachPlayer(animation_player_);
191 } 191 }
192 192
193 void LayerAnimator::AttachLayerToAnimationPlayer(int layer_id) { 193 void LayerAnimator::AttachLayerToAnimationPlayer(int layer_id) {
194 if (!animation_player_->element_id()) 194 if (!animation_player_->element_id())
195 animation_player_->AttachLayer(layer_id); 195 animation_player_->AttachLayer(layer_id);
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 const base::WeakPtr<LayerAnimationSequence>& sequence) 964 const base::WeakPtr<LayerAnimationSequence>& sequence)
965 : sequence_(sequence) { 965 : sequence_(sequence) {
966 } 966 }
967 967
968 LayerAnimator::RunningAnimation::RunningAnimation( 968 LayerAnimator::RunningAnimation::RunningAnimation(
969 const RunningAnimation& other) = default; 969 const RunningAnimation& other) = default;
970 970
971 LayerAnimator::RunningAnimation::~RunningAnimation() { } 971 LayerAnimator::RunningAnimation::~RunningAnimation() { }
972 972
973 } // namespace ui 973 } // namespace ui
OLDNEW
« no previous file with comments | « cc/trees/mutator_host_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698