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

Side by Side Diff: cc/animation/animation_player.cc

Issue 1456303002: CC Animations: Allow AnimationPlayers attached to layers but not attached to timelines/host to die … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "cc/animation/animation_player.h" 5 #include "cc/animation/animation_player.h"
6 6
7 #include "cc/animation/animation_delegate.h" 7 #include "cc/animation/animation_delegate.h"
8 #include "cc/animation/animation_host.h" 8 #include "cc/animation/animation_host.h"
9 #include "cc/animation/animation_timeline.h" 9 #include "cc/animation/animation_timeline.h"
10 #include "cc/animation/element_animations.h" 10 #include "cc/animation/element_animations.h"
(...skipping 11 matching lines...) Expand all
22 element_animations_(), 22 element_animations_(),
23 layer_animation_delegate_(), 23 layer_animation_delegate_(),
24 id_(id), 24 id_(id),
25 layer_id_(0) { 25 layer_id_(0) {
26 DCHECK(id_); 26 DCHECK(id_);
27 } 27 }
28 28
29 AnimationPlayer::~AnimationPlayer() { 29 AnimationPlayer::~AnimationPlayer() {
30 DCHECK(!animation_timeline_); 30 DCHECK(!animation_timeline_);
31 DCHECK(!element_animations_); 31 DCHECK(!element_animations_);
32 DCHECK(!layer_id_);
33 } 32 }
34 33
35 scoped_refptr<AnimationPlayer> AnimationPlayer::CreateImplInstance() const { 34 scoped_refptr<AnimationPlayer> AnimationPlayer::CreateImplInstance() const {
36 scoped_refptr<AnimationPlayer> player = AnimationPlayer::Create(id()); 35 scoped_refptr<AnimationPlayer> player = AnimationPlayer::Create(id());
37 return player; 36 return player;
38 } 37 }
39 38
40 void AnimationPlayer::SetAnimationHost(AnimationHost* animation_host) { 39 void AnimationPlayer::SetAnimationHost(AnimationHost* animation_host) {
41 animation_host_ = animation_host; 40 animation_host_ = animation_host;
42 } 41 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 target_property, group); 179 target_property, group);
181 } 180 }
182 181
183 void AnimationPlayer::SetNeedsCommit() { 182 void AnimationPlayer::SetNeedsCommit() {
184 DCHECK(animation_host_); 183 DCHECK(animation_host_);
185 animation_host_->SetNeedsCommit(); 184 animation_host_->SetNeedsCommit();
186 animation_host_->SetNeedsRebuildPropertyTrees(); 185 animation_host_->SetNeedsRebuildPropertyTrees();
187 } 186 }
188 187
189 } // namespace cc 188 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698