| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 void SetNeedsAnimateInput() override; | 194 void SetNeedsAnimateInput() override; |
| 195 bool IsCurrentlyScrollingInnerViewport() const override; | 195 bool IsCurrentlyScrollingInnerViewport() const override; |
| 196 bool IsCurrentlyScrollingLayerAt( | 196 bool IsCurrentlyScrollingLayerAt( |
| 197 const gfx::Point& viewport_point, | 197 const gfx::Point& viewport_point, |
| 198 InputHandler::ScrollInputType type) const override; | 198 InputHandler::ScrollInputType type) const override; |
| 199 EventListenerProperties GetEventListenerProperties( | 199 EventListenerProperties GetEventListenerProperties( |
| 200 EventListenerClass event_class) const override; | 200 EventListenerClass event_class) const override; |
| 201 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; | 201 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; |
| 202 std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 202 std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| 203 ui::LatencyInfo* latency) override; | 203 ui::LatencyInfo* latency) override; |
| 204 ScrollElasticityHelper* CreateScrollElasticityHelper() override; | 204 ScrollElasticityHelper* CreateRootScrollElasticityHelper() override; |
| 205 base::WeakPtr<ScrollElasticityHelper> |
| 206 ScrollElasticityHelperForScrollingLayer() override; |
| 207 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) override; |
| 205 | 208 |
| 206 // TopControlsManagerClient implementation. | 209 // TopControlsManagerClient implementation. |
| 207 float TopControlsHeight() const override; | 210 float TopControlsHeight() const override; |
| 208 void SetCurrentTopControlsShownRatio(float offset) override; | 211 void SetCurrentTopControlsShownRatio(float offset) override; |
| 209 float CurrentTopControlsShownRatio() const override; | 212 float CurrentTopControlsShownRatio() const override; |
| 210 void DidChangeTopControlsPosition() override; | 213 void DidChangeTopControlsPosition() override; |
| 211 bool HaveRootScrollLayer() const override; | 214 bool HaveRootScrollLayer() const override; |
| 212 | 215 |
| 213 void UpdateViewportContainerSizes(); | 216 void UpdateViewportContainerSizes(); |
| 214 | 217 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 // Resets all of the trees to an empty state. | 323 // Resets all of the trees to an empty state. |
| 321 void ResetTreesForTesting(); | 324 void ResetTreesForTesting(); |
| 322 | 325 |
| 323 size_t SourceAnimationFrameNumberForTesting() const; | 326 size_t SourceAnimationFrameNumberForTesting() const; |
| 324 | 327 |
| 325 void RegisterScrollbarAnimationController(int scroll_layer_id); | 328 void RegisterScrollbarAnimationController(int scroll_layer_id); |
| 326 void UnregisterScrollbarAnimationController(int scroll_layer_id); | 329 void UnregisterScrollbarAnimationController(int scroll_layer_id); |
| 327 ScrollbarAnimationController* ScrollbarAnimationControllerForId( | 330 ScrollbarAnimationController* ScrollbarAnimationControllerForId( |
| 328 int scroll_layer_id) const; | 331 int scroll_layer_id) const; |
| 329 | 332 |
| 333 void RegisterScrollElasticityHelper(int scroll_layer_id); |
| 334 void UnregisterScrollElasticityHelper(int scroll_layer_id); |
| 335 ScrollElasticityHelper* ScrollElasticityHelperForId(int scroll_layer_id); |
| 336 |
| 330 DrawMode GetDrawMode() const; | 337 DrawMode GetDrawMode() const; |
| 331 | 338 |
| 332 // Viewport size in draw space: this size is in physical pixels and is used | 339 // Viewport size in draw space: this size is in physical pixels and is used |
| 333 // for draw properties, tilings, quads and render passes. | 340 // for draw properties, tilings, quads and render passes. |
| 334 gfx::Size DrawViewportSize() const; | 341 gfx::Size DrawViewportSize() const; |
| 335 | 342 |
| 336 // Viewport rect in view space used for tiling prioritization. | 343 // Viewport rect in view space used for tiling prioritization. |
| 337 const gfx::Rect ViewportRectForTilePriority() const; | 344 const gfx::Rect ViewportRectForTilePriority() const; |
| 338 | 345 |
| 339 // RendererClient implementation. | 346 // RendererClient implementation. |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 InputHandlerClient* input_handler_client_; | 770 InputHandlerClient* input_handler_client_; |
| 764 bool did_lock_scrolling_layer_; | 771 bool did_lock_scrolling_layer_; |
| 765 bool wheel_scrolling_; | 772 bool wheel_scrolling_; |
| 766 bool scroll_affects_scroll_handler_; | 773 bool scroll_affects_scroll_handler_; |
| 767 int scroll_layer_id_when_mouse_over_scrollbar_; | 774 int scroll_layer_id_when_mouse_over_scrollbar_; |
| 768 std::vector<std::unique_ptr<SwapPromise>> | 775 std::vector<std::unique_ptr<SwapPromise>> |
| 769 swap_promises_for_main_thread_scroll_update_; | 776 swap_promises_for_main_thread_scroll_update_; |
| 770 | 777 |
| 771 // An object to implement the ScrollElasticityHelper interface and | 778 // An object to implement the ScrollElasticityHelper interface and |
| 772 // hold all state related to elasticity. May be NULL if never requested. | 779 // hold all state related to elasticity. May be NULL if never requested. |
| 773 std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; | 780 std::unique_ptr<ScrollElasticityHelper> root_scroll_elasticity_helper_; |
| 774 | 781 |
| 775 bool tile_priorities_dirty_; | 782 bool tile_priorities_dirty_; |
| 776 | 783 |
| 777 const LayerTreeSettings settings_; | 784 const LayerTreeSettings settings_; |
| 778 LayerTreeDebugState debug_state_; | 785 LayerTreeDebugState debug_state_; |
| 779 bool visible_; | 786 bool visible_; |
| 780 ManagedMemoryPolicy cached_managed_memory_policy_; | 787 ManagedMemoryPolicy cached_managed_memory_policy_; |
| 781 | 788 |
| 782 const bool is_synchronous_single_threaded_; | 789 const bool is_synchronous_single_threaded_; |
| 783 TileManager tile_manager_; | 790 TileManager tile_manager_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 gfx::Rect viewport_damage_rect_; | 830 gfx::Rect viewport_damage_rect_; |
| 824 | 831 |
| 825 std::unique_ptr<AnimationHost> animation_host_; | 832 std::unique_ptr<AnimationHost> animation_host_; |
| 826 std::set<VideoFrameController*> video_frame_controllers_; | 833 std::set<VideoFrameController*> video_frame_controllers_; |
| 827 | 834 |
| 828 // Map from scroll layer ID to scrollbar animation controller. | 835 // Map from scroll layer ID to scrollbar animation controller. |
| 829 // There is one animation controller per pair of overlay scrollbars. | 836 // There is one animation controller per pair of overlay scrollbars. |
| 830 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>> | 837 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>> |
| 831 scrollbar_animation_controllers_; | 838 scrollbar_animation_controllers_; |
| 832 | 839 |
| 840 // Map from scroll layer ID to elasticity helper. |
| 841 std::unordered_map<int, std::unique_ptr<ScrollElasticityHelper>> |
| 842 scroll_elasticity_helpers_; |
| 843 |
| 833 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 844 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 834 MicroBenchmarkControllerImpl micro_benchmark_controller_; | 845 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
| 835 std::unique_ptr<SynchronousTaskGraphRunner> | 846 std::unique_ptr<SynchronousTaskGraphRunner> |
| 836 single_thread_synchronous_task_graph_runner_; | 847 single_thread_synchronous_task_graph_runner_; |
| 837 | 848 |
| 838 // Optional callback to notify of new tree activations. | 849 // Optional callback to notify of new tree activations. |
| 839 base::Closure tree_activation_callback_; | 850 base::Closure tree_activation_callback_; |
| 840 | 851 |
| 841 SharedBitmapManager* shared_bitmap_manager_; | 852 SharedBitmapManager* shared_bitmap_manager_; |
| 842 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 853 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 854 | 865 |
| 855 std::unique_ptr<PendingTreeDurationHistogramTimer> | 866 std::unique_ptr<PendingTreeDurationHistogramTimer> |
| 856 pending_tree_duration_timer_; | 867 pending_tree_duration_timer_; |
| 857 | 868 |
| 858 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 869 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 859 }; | 870 }; |
| 860 | 871 |
| 861 } // namespace cc | 872 } // namespace cc |
| 862 | 873 |
| 863 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 874 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |