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

Unified Diff: cc/animation/timing_function.cc

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 | « cc/animation/timing_function.h ('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/animation/timing_function.cc
diff --git a/cc/animation/timing_function.cc b/cc/animation/timing_function.cc
index bf11c20fe03a13f448f486ff600aef2005ea9d4c..71319e121d8c10ad3bf2f0c0a6b9dfd37c7bf165 100644
--- a/cc/animation/timing_function.cc
+++ b/cc/animation/timing_function.cc
@@ -45,6 +45,10 @@ void CubicBezierTimingFunction::Range(float* min, float* max) const {
*max = static_cast<float>(max_d);
}
+float CubicBezierTimingFunction::Velocity(double x) const {
+ return static_cast<float>(bezier_.Slope(x));
+}
+
// These numbers come from
// http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag.
scoped_ptr<TimingFunction> EaseTimingFunction::Create() {
« no previous file with comments | « cc/animation/timing_function.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698