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

Unified Diff: cc/animation/animation_player.h

Issue 1894023002: CC Animation: Make ElementAnimations a ref-counted object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/animation_host.cc ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_player.h
diff --git a/cc/animation/animation_player.h b/cc/animation/animation_player.h
index 301e9327611602b4c0030ebdf1b52d004835f815..92fca11b3e5a62d991fce9fad087a0018eebb35b 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -13,6 +13,7 @@
#include "base/time/time.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_curve.h"
+#include "cc/animation/element_animations.h"
#include "cc/base/cc_export.h"
namespace cc {
@@ -56,8 +57,9 @@ class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer>,
void SetAnimationTimeline(AnimationTimeline* timeline);
// ElementAnimations object where this player is listed.
- // ElementAnimations has a reference to shared LayerAnimationController.
- ElementAnimations* element_animations() const { return element_animations_; }
+ scoped_refptr<ElementAnimations> element_animations() const {
+ return element_animations_;
+ }
void set_layer_animation_delegate(AnimationDelegate* delegate) {
layer_animation_delegate_ = delegate;
@@ -117,7 +119,7 @@ class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer>,
AnimationHost* animation_host_;
AnimationTimeline* animation_timeline_;
// element_animations isn't null if player attached to an element (layer).
- ElementAnimations* element_animations_;
+ scoped_refptr<ElementAnimations> element_animations_;
AnimationDelegate* layer_animation_delegate_;
int id_;
« no previous file with comments | « cc/animation/animation_host.cc ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698