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

Unified Diff: cc/layer.h

Issue 11491003: Revert 171714 - Use an auxiliary list of animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/cc.gyp ('k') | cc/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer.h
diff --git a/cc/layer.h b/cc/layer.h
index 3d63e74db8f1c2b238f88f431d44e777c60cc948..91a7cdbcd94c76b89476ea9473909f1bd46f4f60 100644
--- a/cc/layer.h
+++ b/cc/layer.h
@@ -44,13 +44,21 @@ struct RenderingStats;
// Base class for composited layers. Special layer types are derived from
// this class.
-class CC_EXPORT Layer : public base::RefCounted<Layer> {
+class CC_EXPORT Layer : public base::RefCounted<Layer>, public LayerAnimationControllerClient {
public:
typedef std::vector<scoped_refptr<Layer> > LayerList;
static scoped_refptr<Layer> create();
- int id() const;
+ // LayerAnimationControllerClient implementation
+ virtual int id() const OVERRIDE;
+ virtual void setOpacityFromAnimation(float) OVERRIDE;
+ virtual float opacity() const OVERRIDE;
+ virtual void setTransformFromAnimation(const gfx::Transform&) OVERRIDE;
+ // A layer's transform operates layer space. That is, entirely in logical,
+ // non-page-scaled pixels (that is, they have page zoom baked in, but not page scale).
+ // The root layer is a special case -- it operates in physical pixels.
+ virtual const gfx::Transform& transform() const OVERRIDE;
Layer* rootLayer();
Layer* parent() { return m_parent; }
@@ -91,7 +99,6 @@ public:
virtual bool needsDisplay() const;
void setOpacity(float);
- float opacity() const;
bool opacityIsAnimating() const;
void setFilters(const WebKit::WebFilterOperations&);
@@ -121,7 +128,6 @@ public:
const gfx::Transform& sublayerTransform() const { return m_sublayerTransform; }
void setTransform(const gfx::Transform&);
- const gfx::Transform& transform() const;
bool transformIsAnimating() const;
DrawProperties<Layer, RenderSurface>& drawProperties() { return m_drawProperties; }
@@ -261,8 +267,8 @@ public:
void resumeAnimations(double monotonicTime);
LayerAnimationController* layerAnimationController() { return m_layerAnimationController.get(); }
- void setLayerAnimationController(scoped_refptr<LayerAnimationController>);
- scoped_refptr<LayerAnimationController> releaseLayerAnimationController();
+ void setLayerAnimationController(scoped_ptr<LayerAnimationController>);
+ scoped_ptr<LayerAnimationController> releaseLayerAnimationController();
void setLayerAnimationDelegate(WebKit::WebAnimationDelegate* layerAnimationDelegate) { m_layerAnimationDelegate = layerAnimationDelegate; }
@@ -333,7 +339,7 @@ private:
// updated via setLayerTreeHost() if a layer moves between trees.
LayerTreeHost* m_layerTreeHost;
- scoped_refptr<LayerAnimationController> m_layerAnimationController;
+ scoped_ptr<LayerAnimationController> m_layerAnimationController;
// Layer properties.
gfx::Size m_bounds;
@@ -351,6 +357,7 @@ private:
gfx::PointF m_anchorPoint;
SkColor m_backgroundColor;
std::string m_debugName;
+ float m_opacity;
skia::RefPtr<SkImageFilter> m_filter;
WebKit::WebFilterOperations m_filters;
WebKit::WebFilterOperations m_backgroundFilters;
@@ -367,6 +374,7 @@ private:
bool m_drawCheckerboardForMissingTiles;
bool m_forceRenderSurface;
+ gfx::Transform m_transform;
gfx::Transform m_sublayerTransform;
// Replica layer used for reflections.
« no previous file with comments | « cc/cc.gyp ('k') | cc/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698