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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 void renderingStats(RenderingStats*) const; | 238 void renderingStats(RenderingStats*) const; |
239 | 239 |
240 void updateRootScrollLayerImplTransform(); | 240 void updateRootScrollLayerImplTransform(); |
241 | 241 |
242 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } | 242 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } |
243 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } | 243 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } |
244 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } | 244 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } |
245 Proxy* proxy() const { return m_proxy; } | 245 Proxy* proxy() const { return m_proxy; } |
246 | 246 |
| 247 void setSwitches(const LayerTreeSwitches& switches) { m_switches = switches;
} |
| 248 const LayerTreeSwitches& switches() const { return m_switches; } |
| 249 |
247 class CC_EXPORT CullRenderPassesWithCachedTextures { | 250 class CC_EXPORT CullRenderPassesWithCachedTextures { |
248 public: | 251 public: |
249 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; | 252 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; |
250 | 253 |
251 // Iterates from the root first, in order to remove the surfaces closest | 254 // Iterates from the root first, in order to remove the surfaces closest |
252 // to the root with cached textures, and all surfaces that draw into | 255 // to the root with cached textures, and all surfaces that draw into |
253 // them. | 256 // them. |
254 size_t renderPassListBegin(const RenderPassList& list) const { return li
st.size() - 1; } | 257 size_t renderPassListBegin(const RenderPassList& list) const { return li
st.size() - 1; } |
255 size_t renderPassListEnd(const RenderPassList&) const { return 0 - 1; } | 258 size_t renderPassListEnd(const RenderPassList&) const { return 0 - 1; } |
256 size_t renderPassListNext(size_t it) const { return it - 1; } | 259 size_t renderPassListNext(size_t it) const { return it - 1; } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 scoped_ptr<GraphicsContext> m_context; | 325 scoped_ptr<GraphicsContext> m_context; |
323 scoped_ptr<ResourceProvider> m_resourceProvider; | 326 scoped_ptr<ResourceProvider> m_resourceProvider; |
324 scoped_ptr<Renderer> m_renderer; | 327 scoped_ptr<Renderer> m_renderer; |
325 scoped_ptr<LayerImpl> m_rootLayerImpl; | 328 scoped_ptr<LayerImpl> m_rootLayerImpl; |
326 LayerImpl* m_rootScrollLayerImpl; | 329 LayerImpl* m_rootScrollLayerImpl; |
327 LayerImpl* m_currentlyScrollingLayerImpl; | 330 LayerImpl* m_currentlyScrollingLayerImpl; |
328 HeadsUpDisplayLayerImpl* m_hudLayerImpl; | 331 HeadsUpDisplayLayerImpl* m_hudLayerImpl; |
329 int m_scrollingLayerIdFromPreviousTree; | 332 int m_scrollingLayerIdFromPreviousTree; |
330 bool m_scrollDeltaIsInViewportSpace; | 333 bool m_scrollDeltaIsInViewportSpace; |
331 LayerTreeSettings m_settings; | 334 LayerTreeSettings m_settings; |
| 335 LayerTreeSwitches m_switches; |
332 gfx::Size m_layoutViewportSize; | 336 gfx::Size m_layoutViewportSize; |
333 gfx::Size m_deviceViewportSize; | 337 gfx::Size m_deviceViewportSize; |
334 float m_deviceScaleFactor; | 338 float m_deviceScaleFactor; |
335 bool m_visible; | 339 bool m_visible; |
336 bool m_contentsTexturesPurged; | 340 bool m_contentsTexturesPurged; |
337 ManagedMemoryPolicy m_managedMemoryPolicy; | 341 ManagedMemoryPolicy m_managedMemoryPolicy; |
338 | 342 |
339 SkColor m_backgroundColor; | 343 SkColor m_backgroundColor; |
340 bool m_hasTransparentBackground; | 344 bool m_hasTransparentBackground; |
341 | 345 |
(...skipping 20 matching lines...) Expand all Loading... |
362 | 366 |
363 size_t m_numImplThreadScrolls; | 367 size_t m_numImplThreadScrolls; |
364 size_t m_numMainThreadScrolls; | 368 size_t m_numMainThreadScrolls; |
365 | 369 |
366 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 370 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
367 }; | 371 }; |
368 | 372 |
369 } // namespace cc | 373 } // namespace cc |
370 | 374 |
371 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 375 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |