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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 namespace cc { | 43 namespace cc { |
44 | 44 |
45 class AnimationRegistrar; | 45 class AnimationRegistrar; |
46 class Layer; | 46 class Layer; |
47 class LayerTreeHostImpl; | 47 class LayerTreeHostImpl; |
48 class LayerTreeHostImplClient; | 48 class LayerTreeHostImplClient; |
49 class PrioritizedResourceManager; | 49 class PrioritizedResourceManager; |
50 class PrioritizedResource; | 50 class PrioritizedResource; |
51 class ResourceProvider; | 51 class ResourceProvider; |
52 class ResourceUpdateQueue; | 52 class ResourceUpdateQueue; |
| 53 class ScrollbarLayer; |
53 class HeadsUpDisplayLayer; | 54 class HeadsUpDisplayLayer; |
54 class Region; | 55 class Region; |
55 struct ScrollAndScaleSet; | 56 struct ScrollAndScaleSet; |
56 | 57 |
57 | 58 |
58 // Provides information on an Impl's rendering capabilities back to the LayerTre
eHost | 59 // Provides information on an Impl's rendering capabilities back to the LayerTre
eHost |
59 struct CC_EXPORT RendererCapabilities { | 60 struct CC_EXPORT RendererCapabilities { |
60 RendererCapabilities(); | 61 RendererCapabilities(); |
61 ~RendererCapabilities(); | 62 ~RendererCapabilities(); |
62 | 63 |
(...skipping 24 matching lines...) Expand all Loading... |
87 bool needsSharedContext() const { return needsFilterContext() || settings().
acceleratePainting; } | 88 bool needsSharedContext() const { return needsFilterContext() || settings().
acceleratePainting; } |
88 | 89 |
89 // LayerTreeHost interface to Proxy. | 90 // LayerTreeHost interface to Proxy. |
90 void willBeginFrame() { m_client->willBeginFrame(); } | 91 void willBeginFrame() { m_client->willBeginFrame(); } |
91 void didBeginFrame(); | 92 void didBeginFrame(); |
92 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); | 93 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); |
93 void didStopFlinging(); | 94 void didStopFlinging(); |
94 void layout(); | 95 void layout(); |
95 void beginCommitOnImplThread(LayerTreeHostImpl*); | 96 void beginCommitOnImplThread(LayerTreeHostImpl*); |
96 void finishCommitOnImplThread(LayerTreeHostImpl*); | 97 void finishCommitOnImplThread(LayerTreeHostImpl*); |
| 98 void setPinchZoomScrollbarPropertiesIfNeeded(); |
97 void willCommit(); | 99 void willCommit(); |
98 void commitComplete(); | 100 void commitComplete(); |
99 scoped_ptr<OutputSurface> createOutputSurface(); | 101 scoped_ptr<OutputSurface> createOutputSurface(); |
100 scoped_ptr<InputHandler> createInputHandler(); | 102 scoped_ptr<InputHandler> createInputHandler(); |
101 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI
mplClient*); | 103 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI
mplClient*); |
102 void didLoseOutputSurface(); | 104 void didLoseOutputSurface(); |
103 enum RecreateResult { | 105 enum RecreateResult { |
104 RecreateSucceeded, | 106 RecreateSucceeded, |
105 RecreateFailedButTryAgain, | 107 RecreateFailedButTryAgain, |
106 RecreateFailedAndGaveUp, | 108 RecreateFailedAndGaveUp, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 virtual void setNeedsFullTreeSync(); | 147 virtual void setNeedsFullTreeSync(); |
146 void setNeedsRedraw(); | 148 void setNeedsRedraw(); |
147 bool commitRequested() const; | 149 bool commitRequested() const; |
148 | 150 |
149 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl
ockTime); | 151 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl
ockTime); |
150 | 152 |
151 Layer* rootLayer() { return m_rootLayer.get(); } | 153 Layer* rootLayer() { return m_rootLayer.get(); } |
152 const Layer* rootLayer() const { return m_rootLayer.get(); } | 154 const Layer* rootLayer() const { return m_rootLayer.get(); } |
153 void setRootLayer(scoped_refptr<Layer>); | 155 void setRootLayer(scoped_refptr<Layer>); |
154 | 156 |
| 157 Layer* rootScrollLayer() const; |
| 158 |
155 const LayerTreeSettings& settings() const { return m_settings; } | 159 const LayerTreeSettings& settings() const { return m_settings; } |
156 | 160 |
157 void setDebugState(const LayerTreeDebugState& debugState); | 161 void setDebugState(const LayerTreeDebugState& debugState); |
158 const LayerTreeDebugState& debugState() const { return m_debugState; } | 162 const LayerTreeDebugState& debugState() const { return m_debugState; } |
159 | 163 |
160 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); | 164 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); |
161 | 165 |
162 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } | 166 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } |
163 const gfx::Size& deviceViewportSize() const { return m_deviceViewportSize; } | 167 const gfx::Size& deviceViewportSize() const { return m_deviceViewportSize; } |
164 | 168 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 241 |
238 int m_commitNumber; | 242 int m_commitNumber; |
239 RenderingStats m_renderingStats; | 243 RenderingStats m_renderingStats; |
240 | 244 |
241 bool m_rendererInitialized; | 245 bool m_rendererInitialized; |
242 bool m_outputSurfaceLost; | 246 bool m_outputSurfaceLost; |
243 int m_numFailedRecreateAttempts; | 247 int m_numFailedRecreateAttempts; |
244 | 248 |
245 scoped_refptr<Layer> m_rootLayer; | 249 scoped_refptr<Layer> m_rootLayer; |
246 scoped_refptr<HeadsUpDisplayLayer> m_hudLayer; | 250 scoped_refptr<HeadsUpDisplayLayer> m_hudLayer; |
| 251 scoped_refptr<ScrollbarLayer> m_pinchZoomScrollbarHorizontal; |
| 252 scoped_refptr<ScrollbarLayer> m_pinchZoomScrollbarVertical; |
247 | 253 |
248 scoped_ptr<PrioritizedResourceManager> m_contentsTextureManager; | 254 scoped_ptr<PrioritizedResourceManager> m_contentsTextureManager; |
249 scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder; | 255 scoped_ptr<PrioritizedResource> m_surfaceMemoryPlaceholder; |
250 | 256 |
251 LayerTreeSettings m_settings; | 257 LayerTreeSettings m_settings; |
252 LayerTreeDebugState m_debugState; | 258 LayerTreeDebugState m_debugState; |
253 | 259 |
254 gfx::Size m_layoutViewportSize; | 260 gfx::Size m_layoutViewportSize; |
255 gfx::Size m_deviceViewportSize; | 261 gfx::Size m_deviceViewportSize; |
256 float m_deviceScaleFactor; | 262 float m_deviceScaleFactor; |
(...skipping 17 matching lines...) Expand all Loading... |
274 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 280 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
275 | 281 |
276 static bool s_needsFilterContext; | 282 static bool s_needsFilterContext; |
277 | 283 |
278 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 284 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
279 }; | 285 }; |
280 | 286 |
281 } // namespace cc | 287 } // namespace cc |
282 | 288 |
283 #endif // CC_LAYER_TREE_HOST_H_ | 289 #endif // CC_LAYER_TREE_HOST_H_ |
OLD | NEW |