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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 2040543002: Take MT jank into account when animating the scroll offset on CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test + apply suggested improvement Created 4 years, 3 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/layers/viewport.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 420fb9eadb69f38eb19dd30f84a30133b5a1bd16..7074c329d2fa5d325108af594b4da86fd7086bc7 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -171,7 +171,8 @@ class CC_EXPORT LayerTreeHostImpl
ScrollStatus ScrollAnimatedBegin(const gfx::Point& viewport_point) override;
InputHandler::ScrollStatus ScrollAnimated(
const gfx::Point& viewport_point,
- const gfx::Vector2dF& scroll_delta) override;
+ const gfx::Vector2dF& scroll_delta,
+ base::TimeDelta delayed_by = base::TimeDelta()) override;
void ApplyScroll(ScrollNode* scroll_node, ScrollState* scroll_state);
InputHandlerScrollResult ScrollBy(ScrollState* scroll_state) override;
bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
@@ -602,7 +603,8 @@ class CC_EXPORT LayerTreeHostImpl
// Returns true if a scroll offset animation is created and false if we scroll
// by the desired amount without an animation.
bool ScrollAnimationCreate(ScrollNode* scroll_node,
- const gfx::Vector2dF& scroll_amount);
+ const gfx::Vector2dF& scroll_amount,
+ base::TimeDelta delayed_by);
void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator);
LayerTreeMutator* mutator() { return mutator_.get(); }
@@ -712,7 +714,8 @@ class CC_EXPORT LayerTreeHostImpl
void ScrollAnimationAbort(LayerImpl* layer_impl);
bool ScrollAnimationUpdateTarget(ScrollNode* scroll_node,
- const gfx::Vector2dF& scroll_delta);
+ const gfx::Vector2dF& scroll_delta,
+ base::TimeDelta delayed_by);
void SetCompositorContextVisibility(bool is_visible);
void SetWorkerContextVisibility(bool is_visible);
« no previous file with comments | « cc/layers/viewport.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698