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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 virtual void setNeedsRedrawOnImplThread() = 0; | 52 virtual void setNeedsRedrawOnImplThread() = 0; |
53 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0; | 53 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0; |
54 virtual void setNeedsCommitOnImplThread() = 0; | 54 virtual void setNeedsCommitOnImplThread() = 0; |
55 virtual void setNeedsManageTilesOnImplThread() = 0; | 55 virtual void setNeedsManageTilesOnImplThread() = 0; |
56 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; | 56 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; |
57 // Returns true if resources were deleted by this call. | 57 // Returns true if resources were deleted by this call. |
58 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; | 58 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; |
59 virtual void sendManagedMemoryStats() = 0; | 59 virtual void sendManagedMemoryStats() = 0; |
60 virtual bool isInsideDraw() = 0; | 60 virtual bool isInsideDraw() = 0; |
61 virtual void renewTreePriority() = 0; | 61 virtual void renewTreePriority() = 0; |
62 | |
63 protected: | |
64 virtual ~LayerTreeHostImplClient() { } | |
65 }; | 62 }; |
66 | 63 |
67 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta
te | 64 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta
te |
68 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, | 65 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, |
69 public RendererClient, | 66 public RendererClient, |
70 public TileManagerClient, | 67 public TileManagerClient, |
71 public OutputSurfaceClient, | 68 public OutputSurfaceClient, |
72 public TopControlsManagerClient { | 69 public TopControlsManagerClient { |
73 typedef std::vector<LayerImpl*> LayerList; | 70 typedef std::vector<LayerImpl*> LayerList; |
74 | 71 |
(...skipping 13 matching lines...) Expand all Loading... |
88 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; | 85 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; |
89 | 86 |
90 // TopControlsManagerClient implementation. | 87 // TopControlsManagerClient implementation. |
91 virtual void setActiveTreeNeedsUpdateDrawProperties() OVERRIDE; | 88 virtual void setActiveTreeNeedsUpdateDrawProperties() OVERRIDE; |
92 virtual void setNeedsRedraw() OVERRIDE; | 89 virtual void setNeedsRedraw() OVERRIDE; |
93 virtual bool haveRootScrollLayer() const OVERRIDE; | 90 virtual bool haveRootScrollLayer() const OVERRIDE; |
94 virtual float rootScrollLayerTotalScrollY() const OVERRIDE; | 91 virtual float rootScrollLayerTotalScrollY() const OVERRIDE; |
95 | 92 |
96 struct CC_EXPORT FrameData : public RenderPassSink { | 93 struct CC_EXPORT FrameData : public RenderPassSink { |
97 FrameData(); | 94 FrameData(); |
98 virtual ~FrameData(); | 95 ~FrameData(); |
99 | 96 |
100 std::vector<gfx::Rect> occludingScreenSpaceRects; | 97 std::vector<gfx::Rect> occludingScreenSpaceRects; |
101 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; | 98 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; |
102 RenderPassList renderPasses; | 99 RenderPassList renderPasses; |
103 RenderPassIdHashMap renderPassesById; | 100 RenderPassIdHashMap renderPassesById; |
104 const LayerList* renderSurfaceLayerList; | 101 const LayerList* renderSurfaceLayerList; |
105 LayerList willDrawLayers; | 102 LayerList willDrawLayers; |
106 bool containsIncompleteTile; | 103 bool containsIncompleteTile; |
107 | 104 |
108 // RenderPassSink implementation. | 105 // RenderPassSink implementation. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 base::TimeTicks m_currentFrameTime; | 362 base::TimeTicks m_currentFrameTime; |
366 | 363 |
367 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 364 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
368 | 365 |
369 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 366 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
370 }; | 367 }; |
371 | 368 |
372 } // namespace cc | 369 } // namespace cc |
373 | 370 |
374 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 371 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |