| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 public: | 270 public: |
| 271 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; | 271 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; |
| 272 | 272 |
| 273 // Iterates from the root first, in order to remove the surfaces closest | 273 // Iterates from the root first, in order to remove the surfaces closest |
| 274 // to the root with cached textures, and all surfaces that draw into | 274 // to the root with cached textures, and all surfaces that draw into |
| 275 // them. | 275 // them. |
| 276 size_t renderPassListBegin(const RenderPassList& list) const { return li
st.size() - 1; } | 276 size_t renderPassListBegin(const RenderPassList& list) const { return li
st.size() - 1; } |
| 277 size_t renderPassListEnd(const RenderPassList&) const { return 0 - 1; } | 277 size_t renderPassListEnd(const RenderPassList&) const { return 0 - 1; } |
| 278 size_t renderPassListNext(size_t it) const { return it - 1; } | 278 size_t renderPassListNext(size_t it) const { return it - 1; } |
| 279 | 279 |
| 280 CullRenderPassesWithCachedTextures(Renderer& renderer) : m_renderer(rend
erer) { } | 280 explicit CullRenderPassesWithCachedTextures(Renderer& renderer) : m_rend
erer(renderer) { } |
| 281 private: | 281 private: |
| 282 Renderer& m_renderer; | 282 Renderer& m_renderer; |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 class CC_EXPORT CullRenderPassesWithNoQuads { | 285 class CC_EXPORT CullRenderPassesWithNoQuads { |
| 286 public: | 286 public: |
| 287 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; | 287 bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&)
const; |
| 288 | 288 |
| 289 // Iterates in draw order, so that when a surface is removed, and its | 289 // Iterates in draw order, so that when a surface is removed, and its |
| 290 // target becomes empty, then its target can be removed also. | 290 // target becomes empty, then its target can be removed also. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 size_t m_lastSentMemoryUseBytes; | 390 size_t m_lastSentMemoryUseBytes; |
| 391 | 391 |
| 392 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 392 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
| 393 | 393 |
| 394 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 394 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 395 }; | 395 }; |
| 396 | 396 |
| 397 } // namespace cc | 397 } // namespace cc |
| 398 | 398 |
| 399 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 399 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |