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

Unified Diff: cc/layer_impl.h

Issue 11598005: Ref count layer animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/layer_animation_value_observer.h ('k') | cc/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.h
diff --git a/cc/layer_impl.h b/cc/layer_impl.h
index b767d9ea419fb647846a36d0e546dacaf8315039..59937ba97723daa6ab6316026950b51f48fd3b41 100644
--- a/cc/layer_impl.h
+++ b/cc/layer_impl.h
@@ -13,6 +13,7 @@
#include "cc/draw_properties.h"
#include "cc/input_handler.h"
#include "cc/layer_animation_controller.h"
+#include "cc/layer_animation_value_observer.h"
#include "cc/region.h"
#include "cc/render_pass.h"
#include "cc/render_surface_impl.h"
@@ -43,7 +44,7 @@ class Layer;
struct AppendQuadsData;
-class CC_EXPORT LayerImpl : public LayerAnimationControllerClient {
+class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
public:
typedef ScopedPtrVector<LayerImpl> LayerList;
@@ -54,12 +55,11 @@ public:
virtual ~LayerImpl();
- // LayerAnimationControllerClient implementation.
- virtual int id() const OVERRIDE;
- virtual void setOpacityFromAnimation(float) OVERRIDE;
- virtual float opacity() const OVERRIDE;
- virtual void setTransformFromAnimation(const gfx::Transform&) OVERRIDE;
- virtual const gfx::Transform& transform() const OVERRIDE;
+ int id() const;
+
+ // LayerAnimationValueObserver implementation.
+ virtual void OnOpacityAnimated(float) OVERRIDE;
+ virtual void OnTransformAnimated(const gfx::Transform&) OVERRIDE;
// Tree structure.
LayerImpl* parent() { return m_parent; }
@@ -131,6 +131,7 @@ public:
bool contentsOpaque() const { return m_contentsOpaque; }
void setOpacity(float);
+ float opacity() const;
bool opacityIsAnimating() const;
void setPosition(const gfx::PointF&);
@@ -239,6 +240,7 @@ public:
void setDoubleSided(bool);
void setTransform(const gfx::Transform&);
+ const gfx::Transform& transform() const;
bool transformIsAnimating() const;
const gfx::RectF& updateRect() const { return m_updateRect; }
@@ -388,7 +390,7 @@ private:
gfx::RectF m_updateRect;
// Manages animations for this layer.
- scoped_ptr<LayerAnimationController> m_layerAnimationController;
+ scoped_refptr<LayerAnimationController> m_layerAnimationController;
// Manages scrollbars for this layer
scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController;
« no previous file with comments | « cc/layer_animation_value_observer.h ('k') | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698