| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 public MutatorHostClient, | 137 public MutatorHostClient, |
| 138 public base::SupportsWeakPtr<LayerTreeHostImpl> { | 138 public base::SupportsWeakPtr<LayerTreeHostImpl> { |
| 139 public: | 139 public: |
| 140 static std::unique_ptr<LayerTreeHostImpl> Create( | 140 static std::unique_ptr<LayerTreeHostImpl> Create( |
| 141 const LayerTreeSettings& settings, | 141 const LayerTreeSettings& settings, |
| 142 LayerTreeHostImplClient* client, | 142 LayerTreeHostImplClient* client, |
| 143 TaskRunnerProvider* task_runner_provider, | 143 TaskRunnerProvider* task_runner_provider, |
| 144 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 144 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 145 TaskGraphRunner* task_graph_runner, | 145 TaskGraphRunner* task_graph_runner, |
| 146 std::unique_ptr<MutatorHost> mutator_host, | 146 std::unique_ptr<MutatorHost> mutator_host, |
| 147 int id); | 147 int id, |
| 148 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner); |
| 148 ~LayerTreeHostImpl() override; | 149 ~LayerTreeHostImpl() override; |
| 149 | 150 |
| 150 // InputHandler implementation | 151 // InputHandler implementation |
| 151 void BindToClient(InputHandlerClient* client) override; | 152 void BindToClient(InputHandlerClient* client) override; |
| 152 InputHandler::ScrollStatus ScrollBegin( | 153 InputHandler::ScrollStatus ScrollBegin( |
| 153 ScrollState* scroll_state, | 154 ScrollState* scroll_state, |
| 154 InputHandler::ScrollInputType type) override; | 155 InputHandler::ScrollInputType type) override; |
| 155 InputHandler::ScrollStatus RootScrollBegin( | 156 InputHandler::ScrollStatus RootScrollBegin( |
| 156 ScrollState* scroll_state, | 157 ScrollState* scroll_state, |
| 157 InputHandler::ScrollInputType type) override; | 158 InputHandler::ScrollInputType type) override; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 LayerImpl* ViewportMainScrollLayer(); | 588 LayerImpl* ViewportMainScrollLayer(); |
| 588 | 589 |
| 589 protected: | 590 protected: |
| 590 LayerTreeHostImpl( | 591 LayerTreeHostImpl( |
| 591 const LayerTreeSettings& settings, | 592 const LayerTreeSettings& settings, |
| 592 LayerTreeHostImplClient* client, | 593 LayerTreeHostImplClient* client, |
| 593 TaskRunnerProvider* task_runner_provider, | 594 TaskRunnerProvider* task_runner_provider, |
| 594 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 595 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 595 TaskGraphRunner* task_graph_runner, | 596 TaskGraphRunner* task_graph_runner, |
| 596 std::unique_ptr<MutatorHost> mutator_host, | 597 std::unique_ptr<MutatorHost> mutator_host, |
| 597 int id); | 598 int id, |
| 599 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner); |
| 598 | 600 |
| 599 // Virtual for testing. | 601 // Virtual for testing. |
| 600 virtual bool AnimateLayers(base::TimeTicks monotonic_time); | 602 virtual bool AnimateLayers(base::TimeTicks monotonic_time); |
| 601 | 603 |
| 602 bool is_likely_to_require_a_draw() const { | 604 bool is_likely_to_require_a_draw() const { |
| 603 return is_likely_to_require_a_draw_; | 605 return is_likely_to_require_a_draw_; |
| 604 } | 606 } |
| 605 | 607 |
| 606 // Removes empty or orphan RenderPasses from the frame. | 608 // Removes empty or orphan RenderPasses from the frame. |
| 607 static void RemoveRenderPasses(FrameData* frame); | 609 static void RemoveRenderPasses(FrameData* frame); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 820 |
| 819 std::unique_ptr<PendingTreeDurationHistogramTimer> | 821 std::unique_ptr<PendingTreeDurationHistogramTimer> |
| 820 pending_tree_duration_timer_; | 822 pending_tree_duration_timer_; |
| 821 | 823 |
| 822 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 824 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 823 }; | 825 }; |
| 824 | 826 |
| 825 } // namespace cc | 827 } // namespace cc |
| 826 | 828 |
| 827 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 829 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |