summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 21:13:36 +0000
committernkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 21:13:36 +0000
commitea2f334013cc065471afc0875b334219cfc0b426 (patch)
treec4e1247b3fa8a849e040fc774e20b349ea75da22
parent81a1608890b65727da4e57ecce997fafa0c2f2e0 (diff)
downloadchromium_src-ea2f334013cc065471afc0875b334219cfc0b426.zip
chromium_src-ea2f334013cc065471afc0875b334219cfc0b426.tar.gz
chromium_src-ea2f334013cc065471afc0875b334219cfc0b426.tar.bz2
[cros] Go back to EASE_OUT for boot transition
BUG=141988 Review URL: https://chromiumcodereview.appspot.com/10960034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158079 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash_switches.cc6
-rw-r--r--ash/ash_switches.h2
-rw-r--r--ash/wm/window_animations.cc9
-rw-r--r--chrome/app/generated_resources.grd14
-rw-r--r--chrome/browser/about_flags.cc17
-rw-r--r--ui/base/animation/tween.cc3
-rw-r--r--ui/base/animation/tween.h1
7 files changed, 48 insertions, 4 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc
index 4d75bda..32336fc 100644
--- a/ash/ash_switches.cc
+++ b/ash/ash_switches.cc
@@ -7,6 +7,12 @@
namespace ash {
namespace switches {
+// Variation of boot animation that uses Tween::EASE_OUT_2.
+const char kAshBootAnimationFunction2[] = "ash-boot-animation-function2";
+
+// Variation of boot animation that uses Tween::EASE_OUT_3.
+const char kAshBootAnimationFunction3[] = "ash-boot-animation-function3";
+
// Constrains the pointer movement within a root window on desktop.
const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root";
diff --git a/ash/ash_switches.h b/ash/ash_switches.h
index 2bdb721..d7ace1d 100644
--- a/ash/ash_switches.h
+++ b/ash/ash_switches.h
@@ -15,6 +15,8 @@ namespace switches {
// see chromeos::LoginUtil::GetOffTheRecordCommandLine().)
// Please keep alphabetized.
+ASH_EXPORT extern const char kAshBootAnimationFunction2[];
+ASH_EXPORT extern const char kAshBootAnimationFunction3[];
ASH_EXPORT extern const char kAshConstrainPointerToRoot[];
ASH_EXPORT extern const char kAshDebugShortcuts[];
ASH_EXPORT extern const char kAshDisableWorkspace2[];
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 9133b57..f99ddcc 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -512,10 +512,13 @@ void AnimateShowHideWindowCommon_BrightnessGrayscale(aura::Window* window,
}
int animation_duration = kBrightnessGrayscaleFadeDurationMs;
- ui::Tween::Type animation_type = ui::Tween::EASE_OUT_2;
+ ui::Tween::Type animation_type = ui::Tween::EASE_OUT;
if (CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshDisableBootAnimation2)) {
- animation_type = ui::Tween::EASE_OUT;
+ ash::switches::kAshBootAnimationFunction2)) {
+ animation_type = ui::Tween::EASE_OUT_2;
+ } else if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshBootAnimationFunction3)) {
+ animation_type = ui::Tween::EASE_OUT_3;
}
ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 3035e30..f768541 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6346,7 +6346,19 @@ Keep your key file in a safe place. You will need it to create new versions of y
Disable boot animation v2 (go back to v1).
</message>
<message name="IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION" desc="Description for the flag to go back to wallpaper boot animation v2.">
- Disables wallpaper boot animation v2 - goes back to v1 (except for OOBE case).
+ Disables wallpaper boot animation v2 - goes back to v1 (except for OOBE case) i.e. login UI is not shown till animation is complete.
+ </message>
+ <message name="IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION" desc="Name for the flag to switch wallpaper boot animation function.">
+ Boot animation function.
+ </message>
+ <message name="IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION" desc="Description for the flag to switch wallpaper boot animation function.">
+ Change boot animation function.
+ </message>
+ <message name="IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2" desc="Description for the option of boot animation function.">
+ EASE_OUT_2
+ </message>
+ <message name="IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3" desc="Description for the option of boot animation function.">
+ EASE_OUT_3
</message>
<message name="IDS_FLAGS_DISABLE_WORKSPACE2" desc="Description for the flag to turn off workspace2.">
Disable new window stacking.
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index fa38d14..db989a8 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -149,6 +149,16 @@ const Experiment::Choice kAsyncDnsChoices[] = {
switches::kEnableAsyncDns, ""}
};
+#if defined(OS_CHROMEOS)
+const Experiment::Choice kAshBootAnimationFunction[] = {
+ { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
+ { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
+ ash::switches::kAshBootAnimationFunction2, ""},
+ { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
+ ash::switches::kAshBootAnimationFunction3, ""}
+};
+#endif
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
@@ -835,6 +845,13 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
},
{
+ "boot-animation-fucntion",
+ IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
+ IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
+ kOsCrOS,
+ MULTI_VALUE_TYPE(kAshBootAnimationFunction),
+ },
+ {
"disable-workspace2",
IDS_FLAGS_DISABLE_WORKSPACE2,
IDS_FLAGS_DISABLE_WORKSPACE2_DESCRIPTION,
diff --git a/ui/base/animation/tween.cc b/ui/base/animation/tween.cc
index f3a854f..18a21b8 100644
--- a/ui/base/animation/tween.cc
+++ b/ui/base/animation/tween.cc
@@ -46,6 +46,9 @@ double Tween::CalculateValue(Tween::Type type, double state) {
return 1.0 - pow(1.0 - state, 2);
case EASE_OUT_2:
+ return 1.0 - pow(1.0 - state, 3);
+
+ case EASE_OUT_3:
return 1.0 - pow(1.0 - state, 4);
case SMOOTH_IN_OUT:
diff --git a/ui/base/animation/tween.h b/ui/base/animation/tween.h
index b8b58c7..fc3984c 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_OUT_2, // Variant of EASE_OUT, that starts out slower.
+ EASE_OUT_3, // Variant of EASE_OUT_2, that starts out slower.
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.