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

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

Issue 1302233006: aura: Stop converting Rect to RectF implicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-aura: . Created 5 years, 3 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
« no previous file with comments | « ui/wm/core/image_grid.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 while (root->parent()) 221 while (root->parent())
222 root = root->parent(); 222 root = root->parent();
223 layer->GetTargetTransformRelativeTo(root, transform); 223 layer->GetTargetTransformRelativeTo(root, transform);
224 } 224 }
225 225
226 gfx::Rect GetLayerWorldBoundsAfterTransform(ui::Layer* layer, 226 gfx::Rect GetLayerWorldBoundsAfterTransform(ui::Layer* layer,
227 const gfx::Transform& transform) { 227 const gfx::Transform& transform) {
228 gfx::Transform in_world = transform; 228 gfx::Transform in_world = transform;
229 GetTransformRelativeToRoot(layer, &in_world); 229 GetTransformRelativeToRoot(layer, &in_world);
230 230
231 gfx::RectF transformed = layer->bounds(); 231 gfx::RectF transformed = gfx::RectF(layer->bounds());
232 in_world.TransformRect(&transformed); 232 in_world.TransformRect(&transformed);
233 233
234 return gfx::ToEnclosingRect(transformed); 234 return gfx::ToEnclosingRect(transformed);
235 } 235 }
236 236
237 // Augment the host window so that the enclosing bounds of the full 237 // Augment the host window so that the enclosing bounds of the full
238 // animation will fit inside of it. 238 // animation will fit inside of it.
239 void AugmentWindowSize(aura::Window* window, 239 void AugmentWindowSize(aura::Window* window,
240 const gfx::Transform& end_transform) { 240 const gfx::Transform& end_transform) {
241 aura::client::AnimationHost* animation_host = 241 aura::client::AnimationHost* animation_host =
(...skipping 417 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
« no previous file with comments | « ui/wm/core/image_grid.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698