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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: Merge branch 'master' into GSB_checks_delta_hints Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/scroll_state_data.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index b4007e001b12aa1a68c2e544eb0c1d3422ec05d8..8c765ef9eaa94c714d3ea503d236cc18bff1132a 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -170,7 +170,7 @@ class CC_EXPORT LayerTreeHostImpl
InputHandler::ScrollStatus RootScrollBegin(
ScrollState* scroll_state,
InputHandler::ScrollInputType type) override;
- ScrollStatus ScrollAnimatedBegin(const gfx::Point& viewport_point) override;
+ ScrollStatus ScrollAnimatedBegin(ScrollState* scroll_state) override;
InputHandler::ScrollStatus ScrollAnimated(
const gfx::Point& viewport_point,
const gfx::Vector2dF& scroll_delta,
@@ -634,6 +634,16 @@ class CC_EXPORT LayerTreeHostImpl
BeginFrameTracker current_begin_frame_tracker_;
private:
+ // Transforms viewport start point and scroll delta to local start point and
+ // local delta, respectively. If the transformation of either the start or end
+ // point of a scroll is clipped, the function returns false.
+ bool CalculateLocalScrollDeltaAndStartPoint(
+ const ScrollNode& scroll_node,
+ const gfx::PointF& viewport_point,
+ const gfx::Vector2dF& viewport_delta,
+ const ScrollTree& scroll_tree,
+ gfx::Vector2dF* out_local_scroll_delta,
+ gfx::PointF* out_local_start_point = nullptr);
gfx::Vector2dF ScrollNodeWithViewportSpaceDelta(
ScrollNode* scroll_node,
const gfx::PointF& viewport_point,
@@ -665,6 +675,8 @@ class CC_EXPORT LayerTreeHostImpl
InputHandler::ScrollInputType type);
bool IsInitialScrollHitTestReliable(LayerImpl* layer, const gfx::PointF&);
void DistributeScrollDelta(ScrollState* scroll_state);
+ bool CanConsumeDelta(ScrollNode* scroll_node,
+ const ScrollState& scroll_state);
bool AnimatePageScale(base::TimeTicks monotonic_time);
bool AnimateScrollbars(base::TimeTicks monotonic_time);
« no previous file with comments | « cc/input/scroll_state_data.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698