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_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 TopControlsManager* top_controls_manager() { | 335 TopControlsManager* top_controls_manager() { |
336 return top_controls_manager_.get(); | 336 return top_controls_manager_.get(); |
337 } | 337 } |
338 | 338 |
339 Proxy* proxy() const { return proxy_; } | 339 Proxy* proxy() const { return proxy_; } |
340 | 340 |
341 AnimationRegistrar* animation_registrar() const { | 341 AnimationRegistrar* animation_registrar() const { |
342 return animation_registrar_.get(); | 342 return animation_registrar_.get(); |
343 } | 343 } |
344 | 344 |
| 345 uint64 ui_resource_eviction_count() const { |
| 346 return ui_resource_eviction_count_; |
| 347 } |
| 348 |
345 void SetDebugState(const LayerTreeDebugState& new_debug_state); | 349 void SetDebugState(const LayerTreeDebugState& new_debug_state); |
346 const LayerTreeDebugState& debug_state() const { return debug_state_; } | 350 const LayerTreeDebugState& debug_state() const { return debug_state_; } |
347 | 351 |
348 class CC_EXPORT CullRenderPassesWithCachedTextures { | 352 class CC_EXPORT CullRenderPassesWithCachedTextures { |
349 public: | 353 public: |
350 bool ShouldRemoveRenderPass(const RenderPassDrawQuad& quad, | 354 bool ShouldRemoveRenderPass(const RenderPassDrawQuad& quad, |
351 const FrameData& frame) const; | 355 const FrameData& frame) const; |
352 | 356 |
353 // Iterates from the root first, in order to remove the surfaces closest | 357 // Iterates from the root first, in order to remove the surfaces closest |
354 // to the root with cached textures, and all surfaces that draw into | 358 // to the root with cached textures, and all surfaces that draw into |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 596 |
593 base::TimeTicks current_frame_timeticks_; | 597 base::TimeTicks current_frame_timeticks_; |
594 base::Time current_frame_time_; | 598 base::Time current_frame_time_; |
595 | 599 |
596 scoped_ptr<AnimationRegistrar> animation_registrar_; | 600 scoped_ptr<AnimationRegistrar> animation_registrar_; |
597 | 601 |
598 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 602 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
599 | 603 |
600 bool need_to_update_visible_tiles_before_draw_; | 604 bool need_to_update_visible_tiles_before_draw_; |
601 | 605 |
| 606 // The number of times that UI resources have been evicted since creation. |
| 607 // This is passed to LayerTreeHost at frame creation. If the LayerTreeHost |
| 608 // has not recreated its resources for this eviction count, it will recreate |
| 609 // all resources and pass this counter back through the UI resource update |
| 610 // queue. |
| 611 uint64 ui_resource_eviction_count_; |
| 612 |
602 // Optional callback to notify of new tree activations. | 613 // Optional callback to notify of new tree activations. |
603 base::Closure tree_activation_callback_; | 614 base::Closure tree_activation_callback_; |
604 | 615 |
605 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 616 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
606 }; | 617 }; |
607 | 618 |
608 } // namespace cc | 619 } // namespace cc |
609 | 620 |
610 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 621 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |