| Index: cc/layer_tree_host_impl.h
|
| diff --git a/cc/layer_tree_host_impl.h b/cc/layer_tree_host_impl.h
|
| index c05c30d2ed60cc44e2dd758038a48b73609383ac..05732a96c9e91b7184cb146168f77085f8e3249e 100644
|
| --- a/cc/layer_tree_host_impl.h
|
| +++ b/cc/layer_tree_host_impl.h
|
| @@ -9,6 +9,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/input_handler.h"
|
| #include "cc/layer_sorter.h"
|
| @@ -113,8 +114,10 @@ private:
|
| class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
|
| public RendererClient,
|
| public TileManagerClient,
|
| + public AnimationRegistrar,
|
| public NON_EXPORTED_BASE(WebKit::WebCompositorOutputSurfaceClient) {
|
| typedef std::vector<LayerImpl*> LayerList;
|
| + typedef base::hash_set<LayerAnimationController*> AnimationControllerSet;
|
|
|
| public:
|
| static scoped_ptr<LayerTreeHostImpl> create(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*);
|
| @@ -240,9 +243,7 @@ public:
|
|
|
| bool hasTransparentBackground() const { return m_hasTransparentBackground; }
|
| void setHasTransparentBackground(bool transparent) { m_hasTransparentBackground = transparent; }
|
| -
|
| - bool needsAnimateLayers() const { return m_needsAnimateLayers; }
|
| - void setNeedsAnimateLayers() { m_needsAnimateLayers = true; }
|
| + bool needsAnimateLayers() const { return !m_activeAnimationControllers.empty(); }
|
|
|
| void setNeedsRedraw();
|
|
|
| @@ -330,6 +331,10 @@ private:
|
|
|
| void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const;
|
|
|
| + // AnimationRegistar implementation.
|
| + virtual void Register(LayerAnimationController*) OVERRIDE;
|
| + virtual void Unregister(LayerAnimationController*) OVERRIDE;
|
| +
|
| scoped_ptr<GraphicsContext> m_context;
|
| scoped_ptr<ResourceProvider> m_resourceProvider;
|
| scoped_ptr<Renderer> m_renderer;
|
| @@ -352,7 +357,6 @@ private:
|
| bool m_hasTransparentBackground;
|
|
|
| // If this is true, it is necessary to traverse the layer tree ticking the animators.
|
| - bool m_needsAnimateLayers;
|
| bool m_pinchGestureActive;
|
| gfx::Point m_previousPinchAnchor;
|
|
|
| @@ -377,6 +381,8 @@ private:
|
|
|
| size_t m_cumulativeNumLayersInLayerTree;
|
|
|
| + AnimationControllerSet m_activeAnimationControllers;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
|
| };
|
|
|
|
|