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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 245 |
246 void renderingStats(RenderingStats*) const; | 246 void renderingStats(RenderingStats*) const; |
247 | 247 |
248 void updateRootScrollLayerImplTransform(); | 248 void updateRootScrollLayerImplTransform(); |
249 | 249 |
250 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } | 250 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } |
251 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } | 251 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } |
252 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } | 252 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } |
253 Proxy* proxy() const { return m_proxy; } | 253 Proxy* proxy() const { return m_proxy; } |
254 | 254 |
| 255 void setDebugState(const LayerTreeDebugState& debugState) { m_debugState = d
ebugState; } |
| 256 const LayerTreeDebugState& debugState() const { return m_debugState; } |
| 257 |
255 class CC_EXPORT CullRenderPassesWithCachedTextures { | 258 class CC_EXPORT CullRenderPassesWithCachedTextures { |
256 public: | 259 public: |
257 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; | 260 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; |
258 | 261 |
259 // Iterates from the root first, in order to remove the surfaces closest | 262 // Iterates from the root first, in order to remove the surfaces closest |
260 // to the root with cached textures, and all surfaces that draw into | 263 // to the root with cached textures, and all surfaces that draw into |
261 // them. | 264 // them. |
262 size_t renderPassListBegin(const RenderPassList& list) const { return li
st.size() - 1; } | 265 size_t renderPassListBegin(const RenderPassList& list) const { return li
st.size() - 1; } |
263 size_t renderPassListEnd(const RenderPassList&) const { return 0 - 1; } | 266 size_t renderPassListEnd(const RenderPassList&) const { return 0 - 1; } |
264 size_t renderPassListNext(size_t it) const { return it - 1; } | 267 size_t renderPassListNext(size_t it) const { return it - 1; } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 scoped_ptr<GraphicsContext> m_context; | 333 scoped_ptr<GraphicsContext> m_context; |
331 scoped_ptr<ResourceProvider> m_resourceProvider; | 334 scoped_ptr<ResourceProvider> m_resourceProvider; |
332 scoped_ptr<Renderer> m_renderer; | 335 scoped_ptr<Renderer> m_renderer; |
333 scoped_ptr<LayerImpl> m_rootLayerImpl; | 336 scoped_ptr<LayerImpl> m_rootLayerImpl; |
334 LayerImpl* m_rootScrollLayerImpl; | 337 LayerImpl* m_rootScrollLayerImpl; |
335 LayerImpl* m_currentlyScrollingLayerImpl; | 338 LayerImpl* m_currentlyScrollingLayerImpl; |
336 HeadsUpDisplayLayerImpl* m_hudLayerImpl; | 339 HeadsUpDisplayLayerImpl* m_hudLayerImpl; |
337 int m_scrollingLayerIdFromPreviousTree; | 340 int m_scrollingLayerIdFromPreviousTree; |
338 bool m_scrollDeltaIsInViewportSpace; | 341 bool m_scrollDeltaIsInViewportSpace; |
339 LayerTreeSettings m_settings; | 342 LayerTreeSettings m_settings; |
| 343 LayerTreeDebugState m_debugState; |
340 gfx::Size m_layoutViewportSize; | 344 gfx::Size m_layoutViewportSize; |
341 gfx::Size m_deviceViewportSize; | 345 gfx::Size m_deviceViewportSize; |
342 float m_deviceScaleFactor; | 346 float m_deviceScaleFactor; |
343 bool m_visible; | 347 bool m_visible; |
344 bool m_contentsTexturesPurged; | 348 bool m_contentsTexturesPurged; |
345 ManagedMemoryPolicy m_managedMemoryPolicy; | 349 ManagedMemoryPolicy m_managedMemoryPolicy; |
346 | 350 |
347 SkColor m_backgroundColor; | 351 SkColor m_backgroundColor; |
348 bool m_hasTransparentBackground; | 352 bool m_hasTransparentBackground; |
349 | 353 |
(...skipping 20 matching lines...) Expand all Loading... |
370 | 374 |
371 size_t m_numImplThreadScrolls; | 375 size_t m_numImplThreadScrolls; |
372 size_t m_numMainThreadScrolls; | 376 size_t m_numMainThreadScrolls; |
373 | 377 |
374 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 378 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
375 }; | 379 }; |
376 | 380 |
377 } // namespace cc | 381 } // namespace cc |
378 | 382 |
379 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 383 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |