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 24 matching lines...) Expand all Loading... |
90 bool needsOffscreenContext() const { return m_needsFilterContext || settings
().acceleratePainting; } | 91 bool needsOffscreenContext() const { return m_needsFilterContext || settings
().acceleratePainting; } |
91 | 92 |
92 // LayerTreeHost interface to Proxy. | 93 // LayerTreeHost interface to Proxy. |
93 void willBeginFrame() { m_client->willBeginFrame(); } | 94 void willBeginFrame() { m_client->willBeginFrame(); } |
94 void didBeginFrame(); | 95 void didBeginFrame(); |
95 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); | 96 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); |
96 void didStopFlinging(); | 97 void didStopFlinging(); |
97 void layout(); | 98 void layout(); |
98 void beginCommitOnImplThread(LayerTreeHostImpl*); | 99 void beginCommitOnImplThread(LayerTreeHostImpl*); |
99 void finishCommitOnImplThread(LayerTreeHostImpl*); | 100 void finishCommitOnImplThread(LayerTreeHostImpl*); |
| 101 void setPinchZoomScrollbarPropertiesIfNeeded(); |
| 102 bool rootScrollLayerUsesOverlayScrollbars() const; |
100 void willCommit(); | 103 void willCommit(); |
101 void commitComplete(); | 104 void commitComplete(); |
102 scoped_ptr<OutputSurface> createOutputSurface(); | 105 scoped_ptr<OutputSurface> createOutputSurface(); |
103 scoped_ptr<InputHandler> createInputHandler(); | 106 scoped_ptr<InputHandler> createInputHandler(); |
104 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI
mplClient*); | 107 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI
mplClient*); |
105 void didLoseOutputSurface(); | 108 void didLoseOutputSurface(); |
106 enum RecreateResult { | 109 enum RecreateResult { |
107 RecreateSucceeded, | 110 RecreateSucceeded, |
108 RecreateFailedButTryAgain, | 111 RecreateFailedButTryAgain, |
109 RecreateFailedAndGaveUp, | 112 RecreateFailedAndGaveUp, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 virtual void setNeedsFullTreeSync(); | 151 virtual void setNeedsFullTreeSync(); |
149 void setNeedsRedraw(); | 152 void setNeedsRedraw(); |
150 bool commitRequested() const; | 153 bool commitRequested() const; |
151 | 154 |
152 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl
ockTime); | 155 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl
ockTime); |
153 | 156 |
154 Layer* rootLayer() { return m_rootLayer.get(); } | 157 Layer* rootLayer() { return m_rootLayer.get(); } |
155 const Layer* rootLayer() const { return m_rootLayer.get(); } | 158 const Layer* rootLayer() const { return m_rootLayer.get(); } |
156 void setRootLayer(scoped_refptr<Layer>); | 159 void setRootLayer(scoped_refptr<Layer>); |
157 | 160 |
| 161 Layer* rootScrollLayer() const; |
| 162 |
158 const LayerTreeSettings& settings() const { return m_settings; } | 163 const LayerTreeSettings& settings() const { return m_settings; } |
159 | 164 |
160 void setDebugState(const LayerTreeDebugState& debugState); | 165 void setDebugState(const LayerTreeDebugState& debugState); |
161 const LayerTreeDebugState& debugState() const { return m_debugState; } | 166 const LayerTreeDebugState& debugState() const { return m_debugState; } |
162 | 167 |
163 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); | 168 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); |
164 | 169 |
165 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } | 170 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } |
166 const gfx::Size& deviceViewportSize() const { return m_deviceViewportSize; } | 171 const gfx::Size& deviceViewportSize() const { return m_deviceViewportSize; } |
167 | 172 |
(...skipping 78 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 |