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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 scrollbar_animation_controllers_; | 804 scrollbar_animation_controllers_; |
809 | 805 |
810 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 806 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
811 MicroBenchmarkControllerImpl micro_benchmark_controller_; | 807 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
812 std::unique_ptr<SynchronousTaskGraphRunner> | 808 std::unique_ptr<SynchronousTaskGraphRunner> |
813 single_thread_synchronous_task_graph_runner_; | 809 single_thread_synchronous_task_graph_runner_; |
814 | 810 |
815 // Optional callback to notify of new tree activations. | 811 // Optional callback to notify of new tree activations. |
816 base::Closure tree_activation_callback_; | 812 base::Closure tree_activation_callback_; |
817 | 813 |
818 SharedBitmapManager* shared_bitmap_manager_; | |
819 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | |
820 TaskGraphRunner* task_graph_runner_; | 814 TaskGraphRunner* task_graph_runner_; |
821 int id_; | 815 int id_; |
822 | 816 |
823 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 817 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
824 | 818 |
825 bool requires_high_res_to_draw_; | 819 bool requires_high_res_to_draw_; |
826 bool is_likely_to_require_a_draw_; | 820 bool is_likely_to_require_a_draw_; |
827 | 821 |
828 // TODO(danakj): Delete the compositor frame sink and all resources when | 822 // TODO(danakj): Delete the compositor frame sink and all resources when |
829 // it's lost instead of having this bool. | 823 // it's lost instead of having this bool. |
830 bool has_valid_compositor_frame_sink_; | 824 bool has_valid_compositor_frame_sink_; |
831 | 825 |
832 std::unique_ptr<Viewport> viewport_; | 826 std::unique_ptr<Viewport> viewport_; |
833 | 827 |
834 std::unique_ptr<LayerTreeMutator> mutator_; | 828 std::unique_ptr<LayerTreeMutator> mutator_; |
835 | 829 |
836 std::unique_ptr<PendingTreeDurationHistogramTimer> | 830 std::unique_ptr<PendingTreeDurationHistogramTimer> |
837 pending_tree_duration_timer_; | 831 pending_tree_duration_timer_; |
838 | 832 |
839 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 833 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
840 }; | 834 }; |
841 | 835 |
842 } // namespace cc | 836 } // namespace cc |
843 | 837 |
844 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 838 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |