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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "cc/animation/animation_events.h" | 17 #include "cc/animation/animation_events.h" |
18 #include "cc/animation/animation_registrar.h" | 18 #include "cc/animation/animation_registrar.h" |
19 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
| 20 #include "cc/debug/micro_benchmark_controller_impl.h" |
20 #include "cc/input/input_handler.h" | 21 #include "cc/input/input_handler.h" |
21 #include "cc/input/layer_scroll_offset_delegate.h" | 22 #include "cc/input/layer_scroll_offset_delegate.h" |
22 #include "cc/input/top_controls_manager_client.h" | 23 #include "cc/input/top_controls_manager_client.h" |
23 #include "cc/layers/layer_lists.h" | 24 #include "cc/layers/layer_lists.h" |
24 #include "cc/layers/render_pass_sink.h" | 25 #include "cc/layers/render_pass_sink.h" |
25 #include "cc/output/begin_frame_args.h" | 26 #include "cc/output/begin_frame_args.h" |
26 #include "cc/output/managed_memory_policy.h" | 27 #include "cc/output/managed_memory_policy.h" |
27 #include "cc/output/output_surface_client.h" | 28 #include "cc/output/output_surface_client.h" |
28 #include "cc/output/renderer.h" | 29 #include "cc/output/renderer.h" |
29 #include "cc/quads/render_pass.h" | 30 #include "cc/quads/render_pass.h" |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 UIResourceId uid) const; | 405 UIResourceId uid) const; |
405 | 406 |
406 virtual bool IsUIResourceOpaque(UIResourceId uid) const; | 407 virtual bool IsUIResourceOpaque(UIResourceId uid) const; |
407 | 408 |
408 struct UIResourceData { | 409 struct UIResourceData { |
409 ResourceProvider::ResourceId resource_id; | 410 ResourceProvider::ResourceId resource_id; |
410 gfx::Size size; | 411 gfx::Size size; |
411 bool opaque; | 412 bool opaque; |
412 }; | 413 }; |
413 | 414 |
| 415 void ScheduleMicroBenchmark(scoped_ptr<MicroBenchmarkImpl> benchmark); |
| 416 |
414 protected: | 417 protected: |
415 LayerTreeHostImpl( | 418 LayerTreeHostImpl( |
416 const LayerTreeSettings& settings, | 419 const LayerTreeSettings& settings, |
417 LayerTreeHostImplClient* client, | 420 LayerTreeHostImplClient* client, |
418 Proxy* proxy, | 421 Proxy* proxy, |
419 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 422 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
420 SharedBitmapManager* manager); | 423 SharedBitmapManager* manager); |
421 | 424 |
422 // Virtual for testing. | 425 // Virtual for testing. |
423 virtual void AnimateLayers(base::TimeTicks monotonic_time, | 426 virtual void AnimateLayers(base::TimeTicks monotonic_time, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 bool external_stencil_test_enabled_; | 616 bool external_stencil_test_enabled_; |
614 | 617 |
615 gfx::Rect viewport_damage_rect_; | 618 gfx::Rect viewport_damage_rect_; |
616 | 619 |
617 base::TimeTicks current_frame_timeticks_; | 620 base::TimeTicks current_frame_timeticks_; |
618 base::Time current_frame_time_; | 621 base::Time current_frame_time_; |
619 | 622 |
620 scoped_ptr<AnimationRegistrar> animation_registrar_; | 623 scoped_ptr<AnimationRegistrar> animation_registrar_; |
621 | 624 |
622 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 625 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 626 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
623 | 627 |
624 bool need_to_update_visible_tiles_before_draw_; | 628 bool need_to_update_visible_tiles_before_draw_; |
625 | 629 |
626 // Optional callback to notify of new tree activations. | 630 // Optional callback to notify of new tree activations. |
627 base::Closure tree_activation_callback_; | 631 base::Closure tree_activation_callback_; |
628 | 632 |
629 SharedBitmapManager* shared_bitmap_manager_; | 633 SharedBitmapManager* shared_bitmap_manager_; |
630 | 634 |
631 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 635 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
632 }; | 636 }; |
633 | 637 |
634 } // namespace cc | 638 } // namespace cc |
635 | 639 |
636 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 640 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |