Index: ash/wm/window_animations.cc |
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc |
index 13abd4a8c2307b640cd2e3c58b1a17da6cd1046c..3edcc0848c2a1488e26309406ce669bba6385629 100644 |
--- a/ash/wm/window_animations.cc |
+++ b/ash/wm/window_animations.cc |
@@ -324,7 +324,8 @@ base::TimeDelta CrossFadeImpl(aura::Window* window, |
const bool old_on_top = (old_bounds.width() > new_bounds.width()); |
// Shorten the animation if there's not much visual movement. |
- const base::TimeDelta duration = GetCrossFadeDuration(old_bounds, new_bounds); |
+ const base::TimeDelta duration = GetCrossFadeDuration(window, |
+ old_bounds, new_bounds); |
// Scale up the old layer while translating to new position. |
{ |
@@ -430,9 +431,10 @@ void CrossFadeWindowBetweenWorkspaces(aura::Window* new_workspace, |
CrossFadeImpl(window, old_layer, kCrossFadeTweenType); |
} |
-base::TimeDelta GetCrossFadeDuration(const gfx::Rect& old_bounds, |
+base::TimeDelta GetCrossFadeDuration(aura::Window* window, |
+ const gfx::Rect& old_bounds, |
const gfx::Rect& new_bounds) { |
- if (views::corewm::WindowAnimationsDisabled(NULL)) |
+ if (views::corewm::WindowAnimationsDisabled(window)) |
return base::TimeDelta(); |
int old_area = old_bounds.width() * old_bounds.height(); |