| 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 18 matching lines...) Expand all Loading... |
| 29 #include "cc/output/compositor_frame_sink_client.h" | 29 #include "cc/output/compositor_frame_sink_client.h" |
| 30 #include "cc/output/context_cache_controller.h" | 30 #include "cc/output/context_cache_controller.h" |
| 31 #include "cc/output/managed_memory_policy.h" | 31 #include "cc/output/managed_memory_policy.h" |
| 32 #include "cc/quads/render_pass.h" | 32 #include "cc/quads/render_pass.h" |
| 33 #include "cc/resources/resource_provider.h" | 33 #include "cc/resources/resource_provider.h" |
| 34 #include "cc/resources/ui_resource_client.h" | 34 #include "cc/resources/ui_resource_client.h" |
| 35 #include "cc/scheduler/begin_frame_tracker.h" | 35 #include "cc/scheduler/begin_frame_tracker.h" |
| 36 #include "cc/scheduler/commit_earlyout_reason.h" | 36 #include "cc/scheduler/commit_earlyout_reason.h" |
| 37 #include "cc/scheduler/draw_result.h" | 37 #include "cc/scheduler/draw_result.h" |
| 38 #include "cc/scheduler/video_frame_controller.h" | 38 #include "cc/scheduler/video_frame_controller.h" |
| 39 #include "cc/tiles/decoded_image_tracker.h" |
| 39 #include "cc/tiles/image_decode_cache.h" | 40 #include "cc/tiles/image_decode_cache.h" |
| 40 #include "cc/tiles/tile_manager.h" | 41 #include "cc/tiles/tile_manager.h" |
| 41 #include "cc/trees/layer_tree_mutator.h" | 42 #include "cc/trees/layer_tree_mutator.h" |
| 42 #include "cc/trees/layer_tree_settings.h" | 43 #include "cc/trees/layer_tree_settings.h" |
| 43 #include "cc/trees/mutator_host_client.h" | 44 #include "cc/trees/mutator_host_client.h" |
| 44 #include "cc/trees/task_runner_provider.h" | 45 #include "cc/trees/task_runner_provider.h" |
| 45 #include "ui/gfx/geometry/rect.h" | 46 #include "ui/gfx/geometry/rect.h" |
| 46 | 47 |
| 47 namespace gfx { | 48 namespace gfx { |
| 48 class ScrollOffset; | 49 class ScrollOffset; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 public MutatorHostClient, | 138 public MutatorHostClient, |
| 138 public base::SupportsWeakPtr<LayerTreeHostImpl> { | 139 public base::SupportsWeakPtr<LayerTreeHostImpl> { |
| 139 public: | 140 public: |
| 140 static std::unique_ptr<LayerTreeHostImpl> Create( | 141 static std::unique_ptr<LayerTreeHostImpl> Create( |
| 141 const LayerTreeSettings& settings, | 142 const LayerTreeSettings& settings, |
| 142 LayerTreeHostImplClient* client, | 143 LayerTreeHostImplClient* client, |
| 143 TaskRunnerProvider* task_runner_provider, | 144 TaskRunnerProvider* task_runner_provider, |
| 144 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 145 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 145 TaskGraphRunner* task_graph_runner, | 146 TaskGraphRunner* task_graph_runner, |
| 146 std::unique_ptr<MutatorHost> mutator_host, | 147 std::unique_ptr<MutatorHost> mutator_host, |
| 147 int id); | 148 int id, |
| 149 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner); |
| 148 ~LayerTreeHostImpl() override; | 150 ~LayerTreeHostImpl() override; |
| 149 | 151 |
| 150 // InputHandler implementation | 152 // InputHandler implementation |
| 151 void BindToClient(InputHandlerClient* client) override; | 153 void BindToClient(InputHandlerClient* client) override; |
| 152 InputHandler::ScrollStatus ScrollBegin( | 154 InputHandler::ScrollStatus ScrollBegin( |
| 153 ScrollState* scroll_state, | 155 ScrollState* scroll_state, |
| 154 InputHandler::ScrollInputType type) override; | 156 InputHandler::ScrollInputType type) override; |
| 155 InputHandler::ScrollStatus RootScrollBegin( | 157 InputHandler::ScrollStatus RootScrollBegin( |
| 156 ScrollState* scroll_state, | 158 ScrollState* scroll_state, |
| 157 InputHandler::ScrollInputType type) override; | 159 InputHandler::ScrollInputType type) override; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 LayerImpl* ViewportMainScrollLayer(); | 589 LayerImpl* ViewportMainScrollLayer(); |
| 588 | 590 |
| 589 protected: | 591 protected: |
| 590 LayerTreeHostImpl( | 592 LayerTreeHostImpl( |
| 591 const LayerTreeSettings& settings, | 593 const LayerTreeSettings& settings, |
| 592 LayerTreeHostImplClient* client, | 594 LayerTreeHostImplClient* client, |
| 593 TaskRunnerProvider* task_runner_provider, | 595 TaskRunnerProvider* task_runner_provider, |
| 594 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 596 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 595 TaskGraphRunner* task_graph_runner, | 597 TaskGraphRunner* task_graph_runner, |
| 596 std::unique_ptr<MutatorHost> mutator_host, | 598 std::unique_ptr<MutatorHost> mutator_host, |
| 597 int id); | 599 int id, |
| 600 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner); |
| 598 | 601 |
| 599 // Virtual for testing. | 602 // Virtual for testing. |
| 600 virtual bool AnimateLayers(base::TimeTicks monotonic_time); | 603 virtual bool AnimateLayers(base::TimeTicks monotonic_time); |
| 601 | 604 |
| 602 bool is_likely_to_require_a_draw() const { | 605 bool is_likely_to_require_a_draw() const { |
| 603 return is_likely_to_require_a_draw_; | 606 return is_likely_to_require_a_draw_; |
| 604 } | 607 } |
| 605 | 608 |
| 606 // Removes empty or orphan RenderPasses from the frame. | 609 // Removes empty or orphan RenderPasses from the frame. |
| 607 static void RemoveRenderPasses(FrameData* frame); | 610 static void RemoveRenderPasses(FrameData* frame); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 | 742 |
| 740 bool tile_priorities_dirty_; | 743 bool tile_priorities_dirty_; |
| 741 | 744 |
| 742 const LayerTreeSettings settings_; | 745 const LayerTreeSettings settings_; |
| 743 LayerTreeDebugState debug_state_; | 746 LayerTreeDebugState debug_state_; |
| 744 bool visible_; | 747 bool visible_; |
| 745 ManagedMemoryPolicy cached_managed_memory_policy_; | 748 ManagedMemoryPolicy cached_managed_memory_policy_; |
| 746 | 749 |
| 747 const bool is_synchronous_single_threaded_; | 750 const bool is_synchronous_single_threaded_; |
| 748 TileManager tile_manager_; | 751 TileManager tile_manager_; |
| 752 DecodedImageTracker decoded_image_tracker_; |
| 749 | 753 |
| 750 gfx::Vector2dF accumulated_root_overscroll_; | 754 gfx::Vector2dF accumulated_root_overscroll_; |
| 751 | 755 |
| 752 bool pinch_gesture_active_; | 756 bool pinch_gesture_active_; |
| 753 bool pinch_gesture_end_should_clear_scrolling_layer_; | 757 bool pinch_gesture_end_should_clear_scrolling_layer_; |
| 754 | 758 |
| 755 std::unique_ptr<BrowserControlsOffsetManager> | 759 std::unique_ptr<BrowserControlsOffsetManager> |
| 756 browser_controls_offset_manager_; | 760 browser_controls_offset_manager_; |
| 757 | 761 |
| 758 std::unique_ptr<PageScaleAnimation> page_scale_animation_; | 762 std::unique_ptr<PageScaleAnimation> page_scale_animation_; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 822 |
| 819 std::unique_ptr<PendingTreeDurationHistogramTimer> | 823 std::unique_ptr<PendingTreeDurationHistogramTimer> |
| 820 pending_tree_duration_timer_; | 824 pending_tree_duration_timer_; |
| 821 | 825 |
| 822 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 826 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 823 }; | 827 }; |
| 824 | 828 |
| 825 } // namespace cc | 829 } // namespace cc |
| 826 | 830 |
| 827 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 831 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |