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

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

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 years, 1 month 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void SetNeedsAnimateInput() override; 193 void SetNeedsAnimateInput() override;
194 bool IsCurrentlyScrollingViewport() const override; 194 bool IsCurrentlyScrollingViewport() const override;
195 bool IsCurrentlyScrollingLayerAt( 195 bool IsCurrentlyScrollingLayerAt(
196 const gfx::Point& viewport_point, 196 const gfx::Point& viewport_point,
197 InputHandler::ScrollInputType type) const override; 197 InputHandler::ScrollInputType type) const override;
198 EventListenerProperties GetEventListenerProperties( 198 EventListenerProperties GetEventListenerProperties(
199 EventListenerClass event_class) const override; 199 EventListenerClass event_class) const override;
200 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; 200 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override;
201 std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( 201 std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
202 ui::LatencyInfo* latency) override; 202 ui::LatencyInfo* latency) override;
203 ScrollElasticityHelper* CreateScrollElasticityHelper() override; 203 ScrollElasticityHelper* CreateRootScrollElasticityHelper() override;
204 base::WeakPtr<ScrollElasticityHelper>
205 ScrollElasticityHelperForScrollingLayer() override;
204 bool GetScrollOffsetForLayer(int layer_id, 206 bool GetScrollOffsetForLayer(int layer_id,
205 gfx::ScrollOffset* offset) override; 207 gfx::ScrollOffset* offset) override;
206 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) override; 208 bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) override;
207 209
208 // TopControlsManagerClient implementation. 210 // TopControlsManagerClient implementation.
209 float TopControlsHeight() const override; 211 float TopControlsHeight() const override;
210 float BottomControlsHeight() const override; 212 float BottomControlsHeight() const override;
211 void SetCurrentTopControlsShownRatio(float offset) override; 213 void SetCurrentTopControlsShownRatio(float offset) override;
212 float CurrentTopControlsShownRatio() const override; 214 float CurrentTopControlsShownRatio() const override;
213 void DidChangeTopControlsPosition() override; 215 void DidChangeTopControlsPosition() override;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // Resets all of the trees to an empty state. 323 // Resets all of the trees to an empty state.
322 void ResetTreesForTesting(); 324 void ResetTreesForTesting();
323 325
324 size_t SourceAnimationFrameNumberForTesting() const; 326 size_t SourceAnimationFrameNumberForTesting() const;
325 327
326 void RegisterScrollbarAnimationController(int scroll_layer_id); 328 void RegisterScrollbarAnimationController(int scroll_layer_id);
327 void UnregisterScrollbarAnimationController(int scroll_layer_id); 329 void UnregisterScrollbarAnimationController(int scroll_layer_id);
328 ScrollbarAnimationController* ScrollbarAnimationControllerForId( 330 ScrollbarAnimationController* ScrollbarAnimationControllerForId(
329 int scroll_layer_id) const; 331 int scroll_layer_id) const;
330 332
333 void RegisterScrollElasticityHelper(int scroll_layer_id);
334 void UnregisterScrollElasticityHelper(int scroll_layer_id);
335 ScrollElasticityHelper* ScrollElasticityHelperForId(int scroll_layer_id);
336
331 DrawMode GetDrawMode() const; 337 DrawMode GetDrawMode() const;
332 338
333 // 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
334 // for draw properties, tilings, quads and render passes. 340 // for draw properties, tilings, quads and render passes.
335 gfx::Size DrawViewportSize() const; 341 gfx::Size DrawViewportSize() const;
336 342
337 // Viewport rect in view space used for tiling prioritization. 343 // Viewport rect in view space used for tiling prioritization.
338 const gfx::Rect ViewportRectForTilePriority() const; 344 const gfx::Rect ViewportRectForTilePriority() const;
339 345
340 // TileManagerClient implementation. 346 // TileManagerClient implementation.
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 bool did_lock_scrolling_layer_; 749 bool did_lock_scrolling_layer_;
744 bool wheel_scrolling_; 750 bool wheel_scrolling_;
745 bool scroll_affects_scroll_handler_; 751 bool scroll_affects_scroll_handler_;
746 int scroll_layer_id_mouse_currently_over_; 752 int scroll_layer_id_mouse_currently_over_;
747 753
748 std::vector<std::unique_ptr<SwapPromise>> 754 std::vector<std::unique_ptr<SwapPromise>>
749 swap_promises_for_main_thread_scroll_update_; 755 swap_promises_for_main_thread_scroll_update_;
750 756
751 // An object to implement the ScrollElasticityHelper interface and 757 // An object to implement the ScrollElasticityHelper interface and
752 // hold all state related to elasticity. May be NULL if never requested. 758 // hold all state related to elasticity. May be NULL if never requested.
753 std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; 759 std::unique_ptr<ScrollElasticityHelper> root_scroll_elasticity_helper_;
754 760
755 bool tile_priorities_dirty_; 761 bool tile_priorities_dirty_;
756 762
757 const LayerTreeSettings settings_; 763 const LayerTreeSettings settings_;
758 LayerTreeDebugState debug_state_; 764 LayerTreeDebugState debug_state_;
759 bool visible_; 765 bool visible_;
760 ManagedMemoryPolicy cached_managed_memory_policy_; 766 ManagedMemoryPolicy cached_managed_memory_policy_;
761 767
762 const bool is_synchronous_single_threaded_; 768 const bool is_synchronous_single_threaded_;
763 TileManager tile_manager_; 769 TileManager tile_manager_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 gfx::Rect viewport_damage_rect_; 805 gfx::Rect viewport_damage_rect_;
800 806
801 std::unique_ptr<AnimationHost> animation_host_; 807 std::unique_ptr<AnimationHost> animation_host_;
802 std::set<VideoFrameController*> video_frame_controllers_; 808 std::set<VideoFrameController*> video_frame_controllers_;
803 809
804 // Map from scroll layer ID to scrollbar animation controller. 810 // Map from scroll layer ID to scrollbar animation controller.
805 // There is one animation controller per pair of overlay scrollbars. 811 // There is one animation controller per pair of overlay scrollbars.
806 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>> 812 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>>
807 scrollbar_animation_controllers_; 813 scrollbar_animation_controllers_;
808 814
815 // Map from scroll layer ID to elasticity helper.
816 std::unordered_map<int, std::unique_ptr<ScrollElasticityHelper>>
817 scroll_elasticity_helpers_;
818
809 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 819 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
810 MicroBenchmarkControllerImpl micro_benchmark_controller_; 820 MicroBenchmarkControllerImpl micro_benchmark_controller_;
811 std::unique_ptr<SynchronousTaskGraphRunner> 821 std::unique_ptr<SynchronousTaskGraphRunner>
812 single_thread_synchronous_task_graph_runner_; 822 single_thread_synchronous_task_graph_runner_;
813 823
814 // Optional callback to notify of new tree activations. 824 // Optional callback to notify of new tree activations.
815 base::Closure tree_activation_callback_; 825 base::Closure tree_activation_callback_;
816 826
817 SharedBitmapManager* shared_bitmap_manager_; 827 SharedBitmapManager* shared_bitmap_manager_;
818 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 828 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
(...skipping 15 matching lines...) Expand all
834 844
835 std::unique_ptr<PendingTreeDurationHistogramTimer> 845 std::unique_ptr<PendingTreeDurationHistogramTimer>
836 pending_tree_duration_timer_; 846 pending_tree_duration_timer_;
837 847
838 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 848 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
839 }; 849 };
840 850
841 } // namespace cc 851 } // namespace cc
842 852
843 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 853 #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