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

Unified Diff: cc/animation/scroll_offset_animation_curve.h

Issue 393713002: Scroll offset animation curve retargeting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove workaround. Created 6 years, 5 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 | « no previous file | 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 543ae373f94edd6d3563b27c416de90c2044e07c..3d71e13c729ba44beb869e34bba51af4574907f5 100644
--- a/cc/animation/scroll_offset_animation_curve.h
+++ b/cc/animation/scroll_offset_animation_curve.h
@@ -24,6 +24,8 @@ class CC_EXPORT ScrollOffsetAnimationCurve : public AnimationCurve {
void SetInitialValue(const gfx::Vector2dF& initial_value);
gfx::Vector2dF GetValue(double t) const;
+ gfx::Vector2dF target_value() const { return target_value_; }
+ void UpdateTarget(double t, const gfx::Vector2dF& new_target);
// AnimationCurve implementation
virtual double Duration() const OVERRIDE;
@@ -36,7 +38,10 @@ class CC_EXPORT ScrollOffsetAnimationCurve : public AnimationCurve {
gfx::Vector2dF initial_value_;
gfx::Vector2dF target_value_;
- base::TimeDelta duration_;
+ base::TimeDelta total_animation_duration_;
+
+ // Time from animation start to most recent UpdateTarget.
+ base::TimeDelta last_retarget_;
scoped_ptr<TimingFunction> timing_function_;
« no previous file with comments | « no previous file | cc/animation/scroll_offset_animation_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698