Index: cc/layer_tree_host.h |
diff --git a/cc/layer_tree_host.h b/cc/layer_tree_host.h |
index 5c1ce68d759f4fb174708b7ee6792bbce1209f50..f6247818fdc0544be3d7847c8cd0cfec7734108e 100644 |
--- a/cc/layer_tree_host.h |
+++ b/cc/layer_tree_host.h |
@@ -14,6 +14,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/time.h" |
#include "cc/animation_events.h" |
+#include "cc/animation_registrar.h" |
#include "cc/cc_export.h" |
#include "cc/layer_tree_host_client.h" |
#include "cc/layer_tree_host_common.h" |
@@ -68,7 +69,8 @@ struct CC_EXPORT RendererCapabilities { |
int maxTextureSize; |
}; |
-class CC_EXPORT LayerTreeHost : public RateLimiterClient { |
+class CC_EXPORT LayerTreeHost : public RateLimiterClient, |
+ public AnimationRegistrar { |
public: |
static scoped_ptr<LayerTreeHost> create(LayerTreeHostClient*, const LayerTreeSettings&, scoped_ptr<Thread> implThread); |
virtual ~LayerTreeHost(); |
@@ -145,7 +147,6 @@ public: |
bool commitRequested() const; |
void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallClockTime); |
- virtual void didAddAnimation(); |
Layer* rootLayer() { return m_rootLayer.get(); } |
const Layer* rootLayer() const { return m_rootLayer.get(); } |
@@ -203,8 +204,16 @@ protected: |
bool initialize(scoped_ptr<Thread> implThread); |
bool initializeForTesting(scoped_ptr<Proxy> proxyForTesting); |
+ // AnimationRegistar implementation. |
+ virtual scoped_refptr<LayerAnimationController> GetAnimationControllerForId(int id) OVERRIDE; |
+ virtual void DidActivateAnimationController(LayerAnimationController*) OVERRIDE; |
+ virtual void DidDeactivateAnimationController(LayerAnimationController*) OVERRIDE; |
+ virtual void RegisterAnimationController(LayerAnimationController*) OVERRIDE; |
+ virtual void UnregisterAnimationController(LayerAnimationController*) OVERRIDE; |
+ |
private: |
typedef std::vector<scoped_refptr<Layer> > LayerList; |
+ typedef base::hash_map<int, LayerAnimationController*> AnimationControllerMap; |
bool initializeProxy(scoped_ptr<Proxy> proxy); |
void initializeRenderer(); |
@@ -226,7 +235,6 @@ private: |
void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, base::Time wallClockTime); |
bool m_animating; |
- bool m_needsAnimateLayers; |
bool m_needsFullTreeSync; |
base::CancelableClosure m_prepaintCallback; |
@@ -273,6 +281,9 @@ private: |
static bool s_needsFilterContext; |
+ AnimationControllerMap m_activeAnimationControllers; |
+ AnimationControllerMap m_allAnimationControllers; |
+ |
DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
}; |