| Index: cc/layer_tree_host_impl.h
|
| diff --git a/cc/layer_tree_host_impl.h b/cc/layer_tree_host_impl.h
|
| index d4aa8f5a110950fbb61769d4188a6b9b2293efc7..6e35a13bc0e8ad7510ec6a63d5f0c386cf40a9b4 100644
|
| --- a/cc/layer_tree_host_impl.h
|
| +++ b/cc/layer_tree_host_impl.h
|
| @@ -12,6 +12,7 @@
|
| #include "cc/cc_export.h"
|
| #include "cc/input_handler.h"
|
| #include "cc/layer_sorter.h"
|
| +#include "cc/layer_tree_impl.h"
|
| #include "cc/render_pass.h"
|
| #include "cc/render_pass_sink.h"
|
| #include "cc/renderer.h"
|
| @@ -25,7 +26,6 @@ namespace cc {
|
| class CompletionEvent;
|
| class DebugRectHistory;
|
| class FrameRateCounter;
|
| -class HeadsUpDisplayLayerImpl;
|
| class LayerImpl;
|
| class LayerTreeHostImplTimeSourceAdapter;
|
| class PageScaleAnimation;
|
| @@ -113,6 +113,7 @@ private:
|
| class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
|
| public RendererClient,
|
| public TileManagerClient,
|
| + public LayerTreeImplClient,
|
| public NON_EXPORTED_BASE(WebKit::WebCompositorOutputSurfaceClient) {
|
| typedef std::vector<LayerImpl*> LayerList;
|
|
|
| @@ -179,6 +180,9 @@ public:
|
| // WebCompositorOutputSurfaceClient implementation.
|
| virtual void onVSyncParametersChanged(double monotonicTimebase, double intervalInSeconds) OVERRIDE;
|
|
|
| + // LayerTreeImplClient implementation.
|
| + virtual void OnCanDrawStateChangedForTree(LayerTreeImpl*) OVERRIDE;
|
| +
|
| // Implementation
|
| bool canDraw();
|
| GraphicsContext* context() const;
|
| @@ -198,24 +202,21 @@ public:
|
|
|
| void readback(void* pixels, const gfx::Rect&);
|
|
|
| - void setRootLayer(scoped_ptr<LayerImpl>);
|
| - LayerImpl* rootLayer() { return m_rootLayerImpl.get(); }
|
| + LayerTreeImpl* activeTree() { return m_activeTree.get(); }
|
|
|
| - void setHudLayer(HeadsUpDisplayLayerImpl* layerImpl) { m_hudLayerImpl = layerImpl; }
|
| - HeadsUpDisplayLayerImpl* hudLayer() { return m_hudLayerImpl; }
|
| + // TODO(nduca): Remove these in favor of LayerTreeImpl.
|
| + void setRootLayer(scoped_ptr<LayerImpl>);
|
| + LayerImpl* rootLayer() const { return m_activeTree->RootLayer(); }
|
|
|
| // Release ownership of the current layer tree and replace it with an empty
|
| // tree. Returns the root layer of the detached tree.
|
| scoped_ptr<LayerImpl> detachLayerTree();
|
|
|
| - LayerImpl* rootScrollLayer() const { return m_rootScrollLayerImpl; }
|
| + LayerImpl* rootScrollLayer() const { return m_activeTree->root_scroll_layer(); }
|
|
|
| bool visible() const { return m_visible; }
|
| void setVisible(bool);
|
|
|
| - int sourceFrameNumber() const { return m_sourceFrameNumber; }
|
| - void setSourceFrameNumber(int frameNumber) { m_sourceFrameNumber = frameNumber; }
|
| -
|
| bool contentsTexturesPurged() const { return m_contentsTexturesPurged; }
|
| void setContentsTexturesPurged();
|
| void resetContentsTexturesPurged();
|
| @@ -305,7 +306,6 @@ protected:
|
|
|
| LayerTreeHostImplClient* m_client;
|
| Proxy* m_proxy;
|
| - int m_sourceFrameNumber;
|
|
|
| private:
|
| void computeDoubleTapZoomDeltas(ScrollAndScaleSet* scrollInfo);
|
| @@ -337,11 +337,9 @@ private:
|
| scoped_ptr<ResourceProvider> m_resourceProvider;
|
| scoped_ptr<Renderer> m_renderer;
|
| scoped_ptr<TileManager> m_tileManager;
|
| - scoped_ptr<LayerImpl> m_rootLayerImpl;
|
| - LayerImpl* m_rootScrollLayerImpl;
|
| - LayerImpl* m_currentlyScrollingLayerImpl;
|
| - HeadsUpDisplayLayerImpl* m_hudLayerImpl;
|
| - int m_scrollingLayerIdFromPreviousTree;
|
| +
|
| + scoped_ptr<LayerTreeImpl> m_activeTree;
|
| +
|
| bool m_scrollDeltaIsInViewportSpace;
|
| LayerTreeSettings m_settings;
|
| LayerTreeDebugState m_debugState;
|
|
|