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

Unified Diff: cc/animation/scroll_offset_animation_curve.cc

Issue 1950243005: Communicate MT changes to impl-only scroll offset animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply initial feedback comments Created 4 years, 7 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
Index: cc/animation/scroll_offset_animation_curve.cc
diff --git a/cc/animation/scroll_offset_animation_curve.cc b/cc/animation/scroll_offset_animation_curve.cc
index 54f6fb70d8cb80941011638d0dcc0ff0ecd3909b..cb89f11a77ebd1815a629ce7d23e7e772eac5ef2 100644
--- a/cc/animation/scroll_offset_animation_curve.cc
+++ b/cc/animation/scroll_offset_animation_curve.cc
@@ -108,6 +108,13 @@ bool ScrollOffsetAnimationCurve::HasSetInitialValue() const {
return has_set_initial_value_;
}
+void ScrollOffsetAnimationCurve::ApplyAdjustment(
+ base::TimeDelta t,
+ const gfx::Vector2dF& adjustment) {
+ SetInitialValue(ScrollOffsetWithDelta(GetValue(t), adjustment));
skobes 2016/05/07 00:25:16 I don't think we want to call SetInitialValue here
ymalik 2016/05/10 19:40:59 We are starting essentially aborting the previous
ymalik 2016/05/12 22:31:25 Spoke to you offline. And you're right that we sho
+ target_value_ = ScrollOffsetWithDelta(target_value_, adjustment);
+}
+
gfx::ScrollOffset ScrollOffsetAnimationCurve::GetValue(
base::TimeDelta t) const {
base::TimeDelta duration = total_animation_duration_ - last_retarget_;

Powered by Google App Engine
This is Rietveld 408576698