| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/wm/core/window_animations.h" | 5 #include "ui/wm/core/window_animations.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 new ui::InterpolatedConstantTransform(transform)); | 453 new ui::InterpolatedConstantTransform(transform)); |
| 454 | 454 |
| 455 scoped_ptr<ui::InterpolatedTransform> scale( | 455 scoped_ptr<ui::InterpolatedTransform> scale( |
| 456 new ui::InterpolatedScale(1, kWindowAnimation_Rotate_ScaleFactor)); | 456 new ui::InterpolatedScale(1, kWindowAnimation_Rotate_ScaleFactor)); |
| 457 scoped_ptr<ui::InterpolatedTransform> scale_about_pivot( | 457 scoped_ptr<ui::InterpolatedTransform> scale_about_pivot( |
| 458 new ui::InterpolatedTransformAboutPivot( | 458 new ui::InterpolatedTransformAboutPivot( |
| 459 gfx::Point(xcenter, kWindowAnimation_Rotate_TranslateY), | 459 gfx::Point(xcenter, kWindowAnimation_Rotate_TranslateY), |
| 460 scale.release())); | 460 scale.release())); |
| 461 | 461 |
| 462 scoped_ptr<ui::InterpolatedTransform> translation( | 462 scoped_ptr<ui::InterpolatedTransform> translation( |
| 463 new ui::InterpolatedTranslation(gfx::Point(), gfx::Point( | 463 new ui::InterpolatedTranslation( |
| 464 0, kWindowAnimation_Rotate_TranslateY))); | 464 gfx::PointF(), gfx::PointF(0, kWindowAnimation_Rotate_TranslateY))); |
| 465 | 465 |
| 466 scoped_ptr<ui::InterpolatedTransform> rotation( | 466 scoped_ptr<ui::InterpolatedTransform> rotation( |
| 467 new ui::InterpolatedAxisAngleRotation( | 467 new ui::InterpolatedAxisAngleRotation( |
| 468 gfx::Vector3dF(1, 0, 0), 0, kWindowAnimation_Rotate_DegreesX)); | 468 gfx::Vector3dF(1, 0, 0), 0, kWindowAnimation_Rotate_DegreesX)); |
| 469 | 469 |
| 470 scale_about_pivot->SetChild(perspective.release()); | 470 scale_about_pivot->SetChild(perspective.release()); |
| 471 translation->SetChild(scale_about_pivot.release()); | 471 translation->SetChild(scale_about_pivot.release()); |
| 472 rotation->SetChild(translation.release()); | 472 rotation->SetChild(translation.release()); |
| 473 rotation->SetReversed(show); | 473 rotation->SetReversed(show); |
| 474 | 474 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 // being accessed via Remote Desktop. | 659 // being accessed via Remote Desktop. |
| 660 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == | 660 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == |
| 661 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) | 661 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) |
| 662 return false; | 662 return false; |
| 663 | 663 |
| 664 // Let the user decide whether or not to play the animation. | 664 // Let the user decide whether or not to play the animation. |
| 665 return !gfx::Animation::ShouldRenderRichAnimation(); | 665 return !gfx::Animation::ShouldRenderRichAnimation(); |
| 666 } | 666 } |
| 667 | 667 |
| 668 } // namespace wm | 668 } // namespace wm |
| OLD | NEW |