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

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

Issue 136173004: Early terminate flings when scrolling impossible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 8 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/input/input_handler.h ('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 <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 InputHandler::ScrollInputType type) OVERRIDE; 116 InputHandler::ScrollInputType type) OVERRIDE;
117 virtual bool ScrollBy(const gfx::Point& viewport_point, 117 virtual bool ScrollBy(const gfx::Point& viewport_point,
118 const gfx::Vector2dF& scroll_delta) OVERRIDE; 118 const gfx::Vector2dF& scroll_delta) OVERRIDE;
119 virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point, 119 virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
120 ScrollDirection direction) OVERRIDE; 120 ScrollDirection direction) OVERRIDE;
121 virtual void SetRootLayerScrollOffsetDelegate( 121 virtual void SetRootLayerScrollOffsetDelegate(
122 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; 122 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE;
123 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; 123 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE;
124 virtual void ScrollEnd() OVERRIDE; 124 virtual void ScrollEnd() OVERRIDE;
125 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; 125 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE;
126 virtual void NotifyCurrentFlingVelocity(
127 const gfx::Vector2dF& velocity) OVERRIDE;
128 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE; 126 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE;
129 virtual void PinchGestureBegin() OVERRIDE; 127 virtual void PinchGestureBegin() OVERRIDE;
130 virtual void PinchGestureUpdate(float magnify_delta, 128 virtual void PinchGestureUpdate(float magnify_delta,
131 const gfx::Point& anchor) OVERRIDE; 129 const gfx::Point& anchor) OVERRIDE;
132 virtual void PinchGestureEnd() OVERRIDE; 130 virtual void PinchGestureEnd() OVERRIDE;
133 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset, 131 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset,
134 bool anchor_point, 132 bool anchor_point,
135 float page_scale, 133 float page_scale,
136 base::TimeDelta duration) OVERRIDE; 134 base::TimeDelta duration) OVERRIDE;
137 virtual void ScheduleAnimation() OVERRIDE; 135 virtual void ScheduleAnimation() OVERRIDE;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 374 }
377 size_t RenderPassListNext(size_t it) const { return it + 1; } 375 size_t RenderPassListNext(size_t it) const { return it + 1; }
378 }; 376 };
379 377
380 template <typename RenderPassCuller> 378 template <typename RenderPassCuller>
381 static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame); 379 static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame);
382 380
383 gfx::Vector2dF accumulated_root_overscroll() const { 381 gfx::Vector2dF accumulated_root_overscroll() const {
384 return accumulated_root_overscroll_; 382 return accumulated_root_overscroll_;
385 } 383 }
386 gfx::Vector2dF current_fling_velocity() const {
387 return current_fling_velocity_;
388 }
389 384
390 bool pinch_gesture_active() const { return pinch_gesture_active_; } 385 bool pinch_gesture_active() const { return pinch_gesture_active_; }
391 386
392 void SetTreePriority(TreePriority priority); 387 void SetTreePriority(TreePriority priority);
393 388
394 void UpdateCurrentFrameTime(); 389 void UpdateCurrentFrameTime();
395 void ResetCurrentFrameTimeForNextFrame(); 390 void ResetCurrentFrameTimeForNextFrame();
396 virtual base::TimeTicks CurrentFrameTimeTicks(); 391 virtual base::TimeTicks CurrentFrameTimeTicks();
397 392
398 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } 393 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 bool tile_priorities_dirty_; 562 bool tile_priorities_dirty_;
568 563
569 // The optional delegate for the root layer scroll offset. 564 // The optional delegate for the root layer scroll offset.
570 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 565 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
571 LayerTreeSettings settings_; 566 LayerTreeSettings settings_;
572 LayerTreeDebugState debug_state_; 567 LayerTreeDebugState debug_state_;
573 bool visible_; 568 bool visible_;
574 ManagedMemoryPolicy cached_managed_memory_policy_; 569 ManagedMemoryPolicy cached_managed_memory_policy_;
575 570
576 gfx::Vector2dF accumulated_root_overscroll_; 571 gfx::Vector2dF accumulated_root_overscroll_;
577 gfx::Vector2dF current_fling_velocity_;
578 572
579 bool pinch_gesture_active_; 573 bool pinch_gesture_active_;
580 bool pinch_gesture_end_should_clear_scrolling_layer_; 574 bool pinch_gesture_end_should_clear_scrolling_layer_;
581 gfx::Point previous_pinch_anchor_; 575 gfx::Point previous_pinch_anchor_;
582 576
583 scoped_ptr<TopControlsManager> top_controls_manager_; 577 scoped_ptr<TopControlsManager> top_controls_manager_;
584 578
585 scoped_ptr<PageScaleAnimation> page_scale_animation_; 579 scoped_ptr<PageScaleAnimation> page_scale_animation_;
586 580
587 // This is used for ticking animations slowly when hidden. 581 // This is used for ticking animations slowly when hidden.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 int id_; 652 int id_;
659 653
660 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 654 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
661 655
662 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 656 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
663 }; 657 };
664 658
665 } // namespace cc 659 } // namespace cc
666 660
667 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 661 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698