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_H_ | 5 #ifndef CC_LAYER_TREE_HOST_H_ |
6 #define CC_LAYER_TREE_HOST_H_ | 6 #define CC_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 class AnimationRegistrar; | 46 class AnimationRegistrar; |
47 class HeadsUpDisplayLayer; | 47 class HeadsUpDisplayLayer; |
48 class Layer; | 48 class Layer; |
49 class LayerTreeHostImpl; | 49 class LayerTreeHostImpl; |
50 class LayerTreeHostImplClient; | 50 class LayerTreeHostImplClient; |
51 class PrioritizedResourceManager; | 51 class PrioritizedResourceManager; |
52 class PrioritizedResource; | 52 class PrioritizedResource; |
53 class Region; | 53 class Region; |
54 class ResourceProvider; | 54 class ResourceProvider; |
55 class ResourceUpdateQueue; | 55 class ResourceUpdateQueue; |
56 class ScrollbarLayer; | |
56 class TopControlsManager; | 57 class TopControlsManager; |
57 struct ScrollAndScaleSet; | 58 struct ScrollAndScaleSet; |
58 | 59 |
59 | 60 |
60 // Provides information on an Impl's rendering capabilities back to the LayerTre eHost | 61 // Provides information on an Impl's rendering capabilities back to the LayerTre eHost |
61 struct CC_EXPORT RendererCapabilities { | 62 struct CC_EXPORT RendererCapabilities { |
62 RendererCapabilities(); | 63 RendererCapabilities(); |
63 ~RendererCapabilities(); | 64 ~RendererCapabilities(); |
64 | 65 |
65 unsigned bestTextureFormat; | 66 unsigned bestTextureFormat; |
(...skipping 23 matching lines...) Expand all Loading... | |
89 bool needsOffscreenContext() const { return m_needsFilterContext || settings ().acceleratePainting; } | 90 bool needsOffscreenContext() const { return m_needsFilterContext || settings ().acceleratePainting; } |
90 | 91 |
91 // LayerTreeHost interface to Proxy. | 92 // LayerTreeHost interface to Proxy. |
92 void willBeginFrame() { m_client->willBeginFrame(); } | 93 void willBeginFrame() { m_client->willBeginFrame(); } |
93 void didBeginFrame(); | 94 void didBeginFrame(); |
94 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); | 95 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); |
95 void didStopFlinging(); | 96 void didStopFlinging(); |
96 void layout(); | 97 void layout(); |
97 void beginCommitOnImplThread(LayerTreeHostImpl*); | 98 void beginCommitOnImplThread(LayerTreeHostImpl*); |
98 void finishCommitOnImplThread(LayerTreeHostImpl*); | 99 void finishCommitOnImplThread(LayerTreeHostImpl*); |
100 void setPinchZoomScrollbarsBoundsAndPosition(); | |
101 void createAndAddPinchZoomScrollbars(); | |
99 void willCommit(); | 102 void willCommit(); |
100 void commitComplete(); | 103 void commitComplete(); |
101 scoped_ptr<OutputSurface> createOutputSurface(); | 104 scoped_ptr<OutputSurface> createOutputSurface(); |
102 scoped_ptr<InputHandler> createInputHandler(); | 105 scoped_ptr<InputHandler> createInputHandler(); |
103 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI mplClient*); | 106 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI mplClient*); |
104 void didLoseOutputSurface(); | 107 void didLoseOutputSurface(); |
105 enum RecreateResult { | 108 enum RecreateResult { |
106 RecreateSucceeded, | 109 RecreateSucceeded, |
107 RecreateFailedButTryAgain, | 110 RecreateFailedButTryAgain, |
108 RecreateFailedAndGaveUp, | 111 RecreateFailedAndGaveUp, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 void setNeedsAnimate(); | 147 void setNeedsAnimate(); |
145 // virtual for testing | 148 // virtual for testing |
146 virtual void setNeedsCommit(); | 149 virtual void setNeedsCommit(); |
147 virtual void setNeedsFullTreeSync(); | 150 virtual void setNeedsFullTreeSync(); |
148 void setNeedsRedraw(); | 151 void setNeedsRedraw(); |
149 bool commitRequested() const; | 152 bool commitRequested() const; |
150 | 153 |
151 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime); | 154 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime); |
152 | 155 |
153 Layer* rootLayer() { return m_rootLayer.get(); } | 156 Layer* rootLayer() { return m_rootLayer.get(); } |
157 Layer* rootScrollLayer() const; | |
enne (OOO)
2013/03/06 19:32:58
const functions should not return non-const pointe
wjmaclean
2013/03/06 22:36:53
Done.
| |
158 | |
154 const Layer* rootLayer() const { return m_rootLayer.get(); } | 159 const Layer* rootLayer() const { return m_rootLayer.get(); } |
155 void setRootLayer(scoped_refptr<Layer>); | 160 void setRootLayer(scoped_refptr<Layer>); |
156 | 161 |
157 const LayerTreeSettings& settings() const { return m_settings; } | 162 const LayerTreeSettings& settings() const { return m_settings; } |
158 | 163 |
159 void setDebugState(const LayerTreeDebugState& debugState); | 164 void setDebugState(const LayerTreeDebugState& debugState); |
160 const LayerTreeDebugState& debugState() const { return m_debugState; } | 165 const LayerTreeDebugState& debugState() const { return m_debugState; } |
161 | 166 |
162 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d eviceViewportSize); | 167 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d eviceViewportSize); |
163 | 168 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 | 251 |
247 int m_commitNumber; | 252 int m_commitNumber; |
248 RenderingStats m_renderingStats; | 253 RenderingStats m_renderingStats; |
249 | 254 |
250 bool m_rendererInitialized; | 255 bool m_rendererInitialized; |
251 bool m_outputSurfaceLost; | 256 bool m_outputSurfaceLost; |
252 int m_numFailedRecreateAttempts; | 257 int m_numFailedRecreateAttempts; |
253 | 258 |
254 scoped_refptr<Layer> m_rootLayer; | 259 scoped_refptr<Layer> m_rootLayer; |
255 scoped_refptr<HeadsUpDisplayLayer> m_hudLayer; | 260 scoped_refptr<HeadsUpDisplayLayer> m_hudLayer; |
261 scoped_refptr<ScrollbarLayer> m_pinchZoomScrollbarHorizontal; | |
262 scoped_refptr<ScrollbarLayer> m_pinchZoomScrollbarVertical; | |
256 | 263 |
257 scoped_ptr<PrioritizedResourceManager> m_contentsTextureManager; | 264 scoped_ptr<PrioritizedResourceManager> m_contentsTextureManager; |
258 scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder; | 265 scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder; |
259 | 266 |
260 base::WeakPtr<TopControlsManager> m_topControlsManagerWeakPtr; | 267 base::WeakPtr<TopControlsManager> m_topControlsManagerWeakPtr; |
261 | 268 |
262 LayerTreeSettings m_settings; | 269 LayerTreeSettings m_settings; |
263 LayerTreeDebugState m_debugState; | 270 LayerTreeDebugState m_debugState; |
264 | 271 |
265 gfx::Size m_layoutViewportSize; | 272 gfx::Size m_layoutViewportSize; |
(...skipping 17 matching lines...) Expand all Loading... | |
283 size_t m_partialTextureUpdateRequests; | 290 size_t m_partialTextureUpdateRequests; |
284 | 291 |
285 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 292 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
286 | 293 |
287 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 294 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
288 }; | 295 }; |
289 | 296 |
290 } // namespace cc | 297 } // namespace cc |
291 | 298 |
292 #endif // CC_LAYER_TREE_HOST_H_ | 299 #endif // CC_LAYER_TREE_HOST_H_ |
OLD | NEW |