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

Side by Side Diff: ash/rotator/screen_rotation.cc

Issue 11145005: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hopefully should work this time Created 8 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
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | 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 "ash/rotator/screen_rotation.h" 5 #include "ash/rotator/screen_rotation.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "ui/compositor/layer_animation_delegate.h" 9 #include "ui/compositor/layer_animation_delegate.h"
10 #include "ui/gfx/interpolated_transform.h" 10 #include "ui/gfx/interpolated_transform.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 ScreenRotation::~ScreenRotation() { 40 ScreenRotation::~ScreenRotation() {
41 } 41 }
42 42
43 void ScreenRotation::OnStart(ui::LayerAnimationDelegate* delegate) { 43 void ScreenRotation::OnStart(ui::LayerAnimationDelegate* delegate) {
44 // No rotation required. 44 // No rotation required.
45 if (degrees_ == 0) 45 if (degrees_ == 0)
46 return; 46 return;
47 47
48 const ui::Transform& current_transform = 48 const gfx::Transform& current_transform =
49 delegate->GetTransformForAnimation(); 49 delegate->GetTransformForAnimation();
50 const gfx::Rect& bounds = delegate->GetBoundsForAnimation(); 50 const gfx::Rect& bounds = delegate->GetBoundsForAnimation();
51 51
52 gfx::Point old_pivot; 52 gfx::Point old_pivot;
53 gfx::Point new_pivot; 53 gfx::Point new_pivot;
54 54
55 int width = bounds.width(); 55 int width = bounds.width();
56 int height = bounds.height(); 56 int height = bounds.height();
57 57
58 switch (degrees_) { 58 switch (degrees_) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // static 117 // static
118 const ui::LayerAnimationElement::AnimatableProperties& 118 const ui::LayerAnimationElement::AnimatableProperties&
119 ScreenRotation::GetProperties() { 119 ScreenRotation::GetProperties() {
120 static ui::LayerAnimationElement::AnimatableProperties properties; 120 static ui::LayerAnimationElement::AnimatableProperties properties;
121 if (properties.empty()) 121 if (properties.empty())
122 properties.insert(ui::LayerAnimationElement::TRANSFORM); 122 properties.insert(ui::LayerAnimationElement::TRANSFORM);
123 return properties; 123 return properties;
124 } 124 }
125 125
126 } // namespace ash 126 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698