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