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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 public VideoFrameControllerClient, | 142 public VideoFrameControllerClient, |
143 public LayerTreeMutatorClient, | 143 public LayerTreeMutatorClient, |
144 public MutatorHostClient, | 144 public MutatorHostClient, |
145 public base::SupportsWeakPtr<LayerTreeHostImpl> { | 145 public base::SupportsWeakPtr<LayerTreeHostImpl> { |
146 public: | 146 public: |
147 static std::unique_ptr<LayerTreeHostImpl> Create( | 147 static std::unique_ptr<LayerTreeHostImpl> Create( |
148 const LayerTreeSettings& settings, | 148 const LayerTreeSettings& settings, |
149 LayerTreeHostImplClient* client, | 149 LayerTreeHostImplClient* client, |
150 TaskRunnerProvider* task_runner_provider, | 150 TaskRunnerProvider* task_runner_provider, |
151 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 151 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
152 SharedBitmapManager* shared_bitmap_manager, | |
153 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
154 TaskGraphRunner* task_graph_runner, | 152 TaskGraphRunner* task_graph_runner, |
155 std::unique_ptr<AnimationHost> animation_host, | 153 std::unique_ptr<AnimationHost> animation_host, |
156 int id); | 154 int id); |
157 ~LayerTreeHostImpl() override; | 155 ~LayerTreeHostImpl() override; |
158 | 156 |
159 // InputHandler implementation | 157 // InputHandler implementation |
160 void BindToClient(InputHandlerClient* client) override; | 158 void BindToClient(InputHandlerClient* client) override; |
161 InputHandler::ScrollStatus ScrollBegin( | 159 InputHandler::ScrollStatus ScrollBegin( |
162 ScrollState* scroll_state, | 160 ScrollState* scroll_state, |
163 InputHandler::ScrollInputType type) override; | 161 InputHandler::ScrollInputType type) override; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 } | 596 } |
599 | 597 |
600 LayerImpl* ViewportMainScrollLayer(); | 598 LayerImpl* ViewportMainScrollLayer(); |
601 | 599 |
602 protected: | 600 protected: |
603 LayerTreeHostImpl( | 601 LayerTreeHostImpl( |
604 const LayerTreeSettings& settings, | 602 const LayerTreeSettings& settings, |
605 LayerTreeHostImplClient* client, | 603 LayerTreeHostImplClient* client, |
606 TaskRunnerProvider* task_runner_provider, | 604 TaskRunnerProvider* task_runner_provider, |
607 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 605 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
608 SharedBitmapManager* shared_bitmap_manager, | |
609 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
610 TaskGraphRunner* task_graph_runner, | 606 TaskGraphRunner* task_graph_runner, |
611 std::unique_ptr<AnimationHost> animation_host, | 607 std::unique_ptr<AnimationHost> animation_host, |
612 int id); | 608 int id); |
613 | 609 |
614 // Virtual for testing. | 610 // Virtual for testing. |
615 virtual bool AnimateLayers(base::TimeTicks monotonic_time); | 611 virtual bool AnimateLayers(base::TimeTicks monotonic_time); |
616 | 612 |
617 bool is_likely_to_require_a_draw() const { | 613 bool is_likely_to_require_a_draw() const { |
618 return is_likely_to_require_a_draw_; | 614 return is_likely_to_require_a_draw_; |
619 } | 615 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 scrollbar_animation_controllers_; | 803 scrollbar_animation_controllers_; |
808 | 804 |
809 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 805 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
810 MicroBenchmarkControllerImpl micro_benchmark_controller_; | 806 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
811 std::unique_ptr<SynchronousTaskGraphRunner> | 807 std::unique_ptr<SynchronousTaskGraphRunner> |
812 single_thread_synchronous_task_graph_runner_; | 808 single_thread_synchronous_task_graph_runner_; |
813 | 809 |
814 // Optional callback to notify of new tree activations. | 810 // Optional callback to notify of new tree activations. |
815 base::Closure tree_activation_callback_; | 811 base::Closure tree_activation_callback_; |
816 | 812 |
817 SharedBitmapManager* shared_bitmap_manager_; | |
818 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | |
819 TaskGraphRunner* task_graph_runner_; | 813 TaskGraphRunner* task_graph_runner_; |
820 int id_; | 814 int id_; |
821 | 815 |
822 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 816 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
823 | 817 |
824 bool requires_high_res_to_draw_; | 818 bool requires_high_res_to_draw_; |
825 bool is_likely_to_require_a_draw_; | 819 bool is_likely_to_require_a_draw_; |
826 | 820 |
827 // TODO(danakj): Delete the compositor frame sink and all resources when | 821 // TODO(danakj): Delete the compositor frame sink and all resources when |
828 // it's lost instead of having this bool. | 822 // it's lost instead of having this bool. |
829 bool has_valid_compositor_frame_sink_; | 823 bool has_valid_compositor_frame_sink_; |
830 | 824 |
831 std::unique_ptr<Viewport> viewport_; | 825 std::unique_ptr<Viewport> viewport_; |
832 | 826 |
833 std::unique_ptr<LayerTreeMutator> mutator_; | 827 std::unique_ptr<LayerTreeMutator> mutator_; |
834 | 828 |
835 std::unique_ptr<PendingTreeDurationHistogramTimer> | 829 std::unique_ptr<PendingTreeDurationHistogramTimer> |
836 pending_tree_duration_timer_; | 830 pending_tree_duration_timer_; |
837 | 831 |
838 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 832 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
839 }; | 833 }; |
840 | 834 |
841 } // namespace cc | 835 } // namespace cc |
842 | 836 |
843 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 837 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |