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

Unified Diff: cc/animation/scroll_offset_animation_curve.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/animation/animation_host_unittest.cc ('k') | cc/animation/scroll_offset_animation_curve.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/scroll_offset_animation_curve.h
diff --git a/cc/animation/scroll_offset_animation_curve.h b/cc/animation/scroll_offset_animation_curve.h
index 7f9ea55c53ebc2a033382d3fcb0805ad77fee717..175b4af476b3a233fb69f4e03794c11723618e6e 100644
--- a/cc/animation/scroll_offset_animation_curve.h
+++ b/cc/animation/scroll_offset_animation_curve.h
@@ -25,9 +25,14 @@ class CC_EXPORT ScrollOffsetAnimationCurve : public AnimationCurve {
std::unique_ptr<TimingFunction> timing_function,
DurationBehavior = DurationBehavior::DELTA_BASED);
+ static base::TimeDelta SegmentDuration(const gfx::Vector2dF& delta,
+ DurationBehavior behavior,
+ base::TimeDelta delayed_by);
+
~ScrollOffsetAnimationCurve() override;
- void SetInitialValue(const gfx::ScrollOffset& initial_value);
+ void SetInitialValue(const gfx::ScrollOffset& initial_value,
+ base::TimeDelta delayed_by = base::TimeDelta());
bool HasSetInitialValue() const;
gfx::ScrollOffset GetValue(base::TimeDelta t) const;
gfx::ScrollOffset target_value() const { return target_value_; }
« no previous file with comments | « cc/animation/animation_host_unittest.cc ('k') | cc/animation/scroll_offset_animation_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698