From d84d7e11085d6c7cd5028ceeb5309baecab1e79f Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Sat, 8 Sep 2012 00:54:29 +0000 Subject: Tweaks workspace2 animations based on input from Nicholas. BUG=146892 TEST=none R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10910143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155544 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/base/animation/tween.cc | 3 +++ ui/base/animation/tween.h | 1 + 2 files changed, 4 insertions(+) (limited to 'ui/base') diff --git a/ui/base/animation/tween.cc b/ui/base/animation/tween.cc index fa299c1..51dd298 100644 --- a/ui/base/animation/tween.cc +++ b/ui/base/animation/tween.cc @@ -24,6 +24,9 @@ double Tween::CalculateValue(Tween::Type type, double state) { case EASE_IN: return pow(state, 2); + case EASE_IN_2: + return pow(state, 4); + case EASE_IN_OUT: if (state < 0.5) return pow(state * 2, 2) / 2.0; diff --git a/ui/base/animation/tween.h b/ui/base/animation/tween.h index ca10a0a..46e30e1 100644 --- a/ui/base/animation/tween.h +++ b/ui/base/animation/tween.h @@ -18,6 +18,7 @@ class UI_EXPORT Tween { LINEAR, // Linear. EASE_OUT, // Fast in, slow out (default). EASE_IN, // Slow in, fast out. + EASE_IN_2, // Variant of EASE_IN that starts out slower. EASE_IN_OUT, // Slow in and out, fast in the middle. FAST_IN_OUT, // Fast in and out, slow in the middle. EASE_OUT_SNAP, // Fast in, slow out, snap to final value. -- cgit v1.1