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

Side by Side Diff: ui/wm/core/window_animations.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 2 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« cc/layers/picture_layer_impl_unittest.cc ('K') | « ui/wm/core/default_screen_position_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698