OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 virtual void didSwapUseIncompleteTileOnImplThread() = 0; | 53 virtual void didSwapUseIncompleteTileOnImplThread() = 0; |
54 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0; | 54 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0; |
55 virtual void setNeedsCommitOnImplThread() = 0; | 55 virtual void setNeedsCommitOnImplThread() = 0; |
56 virtual void setNeedsManageTilesOnImplThread() = 0; | 56 virtual void setNeedsManageTilesOnImplThread() = 0; |
57 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; | 57 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; |
58 // Returns true if resources were deleted by this call. | 58 // Returns true if resources were deleted by this call. |
59 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; | 59 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; |
60 virtual void sendManagedMemoryStats() = 0; | 60 virtual void sendManagedMemoryStats() = 0; |
61 virtual bool isInsideDraw() = 0; | 61 virtual bool isInsideDraw() = 0; |
62 virtual void renewTreePriority() = 0; | 62 virtual void renewTreePriority() = 0; |
| 63 |
| 64 protected: |
| 65 virtual ~LayerTreeHostImplClient() { } |
63 }; | 66 }; |
64 | 67 |
65 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta
te | 68 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta
te |
66 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, | 69 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, |
67 public RendererClient, | 70 public RendererClient, |
68 public TileManagerClient, | 71 public TileManagerClient, |
69 public OutputSurfaceClient, | 72 public OutputSurfaceClient, |
70 public TopControlsManagerClient { | 73 public TopControlsManagerClient { |
71 typedef std::vector<LayerImpl*> LayerList; | 74 typedef std::vector<LayerImpl*> LayerList; |
72 | 75 |
(...skipping 13 matching lines...) Expand all Loading... |
86 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; | 89 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; |
87 | 90 |
88 // TopControlsManagerClient implementation. | 91 // TopControlsManagerClient implementation. |
89 virtual void setActiveTreeNeedsUpdateDrawProperties() OVERRIDE; | 92 virtual void setActiveTreeNeedsUpdateDrawProperties() OVERRIDE; |
90 virtual void setNeedsRedraw() OVERRIDE; | 93 virtual void setNeedsRedraw() OVERRIDE; |
91 virtual bool haveRootScrollLayer() const OVERRIDE; | 94 virtual bool haveRootScrollLayer() const OVERRIDE; |
92 virtual float rootScrollLayerTotalScrollY() const OVERRIDE; | 95 virtual float rootScrollLayerTotalScrollY() const OVERRIDE; |
93 | 96 |
94 struct CC_EXPORT FrameData : public RenderPassSink { | 97 struct CC_EXPORT FrameData : public RenderPassSink { |
95 FrameData(); | 98 FrameData(); |
96 ~FrameData(); | 99 virtual ~FrameData(); |
97 | 100 |
98 std::vector<gfx::Rect> occludingScreenSpaceRects; | 101 std::vector<gfx::Rect> occludingScreenSpaceRects; |
99 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; | 102 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; |
100 RenderPassList renderPasses; | 103 RenderPassList renderPasses; |
101 RenderPassIdHashMap renderPassesById; | 104 RenderPassIdHashMap renderPassesById; |
102 const LayerList* renderSurfaceLayerList; | 105 const LayerList* renderSurfaceLayerList; |
103 LayerList willDrawLayers; | 106 LayerList willDrawLayers; |
104 | 107 |
105 // RenderPassSink implementation. | 108 // RenderPassSink implementation. |
106 virtual void appendRenderPass(scoped_ptr<RenderPass>) OVERRIDE; | 109 virtual void appendRenderPass(scoped_ptr<RenderPass>) OVERRIDE; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 base::TimeTicks m_currentFrameTime; | 365 base::TimeTicks m_currentFrameTime; |
363 | 366 |
364 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 367 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
365 | 368 |
366 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 369 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
367 }; | 370 }; |
368 | 371 |
369 } // namespace cc | 372 } // namespace cc |
370 | 373 |
371 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 374 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |