Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void SetNeedsAnimateInput() override; 192 void SetNeedsAnimateInput() override;
193 bool IsCurrentlyScrollingViewport() const override; 193 bool IsCurrentlyScrollingViewport() const override;
194 bool IsCurrentlyScrollingLayerAt( 194 bool IsCurrentlyScrollingLayerAt(
195 const gfx::Point& viewport_point, 195 const gfx::Point& viewport_point,
196 InputHandler::ScrollInputType type) const override; 196 InputHandler::ScrollInputType type) const override;
197 EventListenerProperties GetEventListenerProperties( 197 EventListenerProperties GetEventListenerProperties(
198 EventListenerClass event_class) const override; 198 EventListenerClass event_class) const override;
199 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; 199 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override;
200 std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( 200 std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
201 ui::LatencyInfo* latency) override; 201 ui::LatencyInfo* latency) override;
202 ScrollElasticityHelper* CreateScrollElasticityHelper() override; 202 ScrollElasticityHelper* CreateRootScrollElasticityHelper() override;
203 base::WeakPtr<ScrollElasticityHelper>
204 ScrollElasticityHelperForScrollingLayer() override;
203 bool GetScrollOffsetForLayer(int layer_id, 205 bool GetScrollOffsetForLayer(int layer_id,
204 gfx::ScrollOffset* offset) override; 206 gfx::ScrollOffset* offset) override;
205 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) override; 207 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) override;
206 208
207 // TopControlsManagerClient implementation. 209 // TopControlsManagerClient implementation.
208 float TopControlsHeight() const override; 210 float TopControlsHeight() const override;
209 float BottomControlsHeight() const override; 211 float BottomControlsHeight() const override;
210 void SetCurrentTopControlsShownRatio(float offset) override; 212 void SetCurrentTopControlsShownRatio(float offset) override;
211 float CurrentTopControlsShownRatio() const override; 213 float CurrentTopControlsShownRatio() const override;
212 void DidChangeTopControlsPosition() override; 214 void DidChangeTopControlsPosition() override;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Resets all of the trees to an empty state. 321 // Resets all of the trees to an empty state.
320 void ResetTreesForTesting(); 322 void ResetTreesForTesting();
321 323
322 size_t SourceAnimationFrameNumberForTesting() const; 324 size_t SourceAnimationFrameNumberForTesting() const;
323 325
324 void RegisterScrollbarAnimationController(int scroll_layer_id); 326 void RegisterScrollbarAnimationController(int scroll_layer_id);
325 void UnregisterScrollbarAnimationController(int scroll_layer_id); 327 void UnregisterScrollbarAnimationController(int scroll_layer_id);
326 ScrollbarAnimationController* ScrollbarAnimationControllerForId( 328 ScrollbarAnimationController* ScrollbarAnimationControllerForId(
327 int scroll_layer_id) const; 329 int scroll_layer_id) const;
328 330
331 void RegisterScrollElasticityHelper(int scroll_layer_id);
332 void UnregisterScrollElasticityHelper(int scroll_layer_id);
333 ScrollElasticityHelper* ScrollElasticityHelperForId(int scroll_layer_id);
334
329 DrawMode GetDrawMode() const; 335 DrawMode GetDrawMode() const;
330 336
331 // Viewport size in draw space: this size is in physical pixels and is used 337 // Viewport size in draw space: this size is in physical pixels and is used
332 // for draw properties, tilings, quads and render passes. 338 // for draw properties, tilings, quads and render passes.
333 gfx::Size DrawViewportSize() const; 339 gfx::Size DrawViewportSize() const;
334 340
335 // Viewport rect in view space used for tiling prioritization. 341 // Viewport rect in view space used for tiling prioritization.
336 const gfx::Rect ViewportRectForTilePriority() const; 342 const gfx::Rect ViewportRectForTilePriority() const;
337 343
338 // TileManagerClient implementation. 344 // TileManagerClient implementation.
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 bool wheel_scrolling_; 752 bool wheel_scrolling_;
747 bool scroll_affects_scroll_handler_; 753 bool scroll_affects_scroll_handler_;
748 int scroll_layer_id_when_mouse_over_scrollbar_; 754 int scroll_layer_id_when_mouse_over_scrollbar_;
749 int captured_scrollbar_layer_id_; 755 int captured_scrollbar_layer_id_;
750 756
751 std::vector<std::unique_ptr<SwapPromise>> 757 std::vector<std::unique_ptr<SwapPromise>>
752 swap_promises_for_main_thread_scroll_update_; 758 swap_promises_for_main_thread_scroll_update_;
753 759
754 // An object to implement the ScrollElasticityHelper interface and 760 // An object to implement the ScrollElasticityHelper interface and
755 // hold all state related to elasticity. May be NULL if never requested. 761 // hold all state related to elasticity. May be NULL if never requested.
756 std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; 762 std::unique_ptr<ScrollElasticityHelper> root_scroll_elasticity_helper_;
757 763
758 bool tile_priorities_dirty_; 764 bool tile_priorities_dirty_;
759 765
760 const LayerTreeSettings settings_; 766 const LayerTreeSettings settings_;
761 LayerTreeDebugState debug_state_; 767 LayerTreeDebugState debug_state_;
762 bool visible_; 768 bool visible_;
763 ManagedMemoryPolicy cached_managed_memory_policy_; 769 ManagedMemoryPolicy cached_managed_memory_policy_;
764 770
765 const bool is_synchronous_single_threaded_; 771 const bool is_synchronous_single_threaded_;
766 TileManager tile_manager_; 772 TileManager tile_manager_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 gfx::Rect viewport_damage_rect_; 808 gfx::Rect viewport_damage_rect_;
803 809
804 std::unique_ptr<AnimationHost> animation_host_; 810 std::unique_ptr<AnimationHost> animation_host_;
805 std::set<VideoFrameController*> video_frame_controllers_; 811 std::set<VideoFrameController*> video_frame_controllers_;
806 812
807 // Map from scroll layer ID to scrollbar animation controller. 813 // Map from scroll layer ID to scrollbar animation controller.
808 // There is one animation controller per pair of overlay scrollbars. 814 // There is one animation controller per pair of overlay scrollbars.
809 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>> 815 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>>
810 scrollbar_animation_controllers_; 816 scrollbar_animation_controllers_;
811 817
818 // Map from scroll layer ID to elasticity helper.
819 std::unordered_map<int, std::unique_ptr<ScrollElasticityHelper>>
820 scroll_elasticity_helpers_;
821
812 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 822 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
813 MicroBenchmarkControllerImpl micro_benchmark_controller_; 823 MicroBenchmarkControllerImpl micro_benchmark_controller_;
814 std::unique_ptr<SynchronousTaskGraphRunner> 824 std::unique_ptr<SynchronousTaskGraphRunner>
815 single_thread_synchronous_task_graph_runner_; 825 single_thread_synchronous_task_graph_runner_;
816 826
817 // Optional callback to notify of new tree activations. 827 // Optional callback to notify of new tree activations.
818 base::Closure tree_activation_callback_; 828 base::Closure tree_activation_callback_;
819 829
820 SharedBitmapManager* shared_bitmap_manager_; 830 SharedBitmapManager* shared_bitmap_manager_;
821 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 831 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
(...skipping 15 matching lines...) Expand all
837 847
838 std::unique_ptr<PendingTreeDurationHistogramTimer> 848 std::unique_ptr<PendingTreeDurationHistogramTimer>
839 pending_tree_duration_timer_; 849 pending_tree_duration_timer_;
840 850
841 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 851 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
842 }; 852 };
843 853
844 } // namespace cc 854 } // namespace cc
845 855
846 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 856 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698