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

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

Issue 11896017: Thread ui opacity animations (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Correctly deal with sequences meant to start together Created 7 years, 11 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 "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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool ScreenRotation::OnProgress(double t, 104 bool ScreenRotation::OnProgress(double t,
105 ui::LayerAnimationDelegate* delegate) { 105 ui::LayerAnimationDelegate* delegate) {
106 delegate->SetTransformFromAnimation(interpolated_transform_->Interpolate(t)); 106 delegate->SetTransformFromAnimation(interpolated_transform_->Interpolate(t));
107 return true; 107 return true;
108 } 108 }
109 109
110 void ScreenRotation::OnGetTarget(TargetValue* target) const { 110 void ScreenRotation::OnGetTarget(TargetValue* target) const {
111 target->transform = interpolated_transform_->Interpolate(1.0); 111 target->transform = interpolated_transform_->Interpolate(1.0);
112 } 112 }
113 113
114 void ScreenRotation::OnAbort() { 114 void ScreenRotation::OnAbort(ui::LayerAnimationDelegate* delegate) {
115 } 115 }
116 116
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

Powered by Google App Engine
This is Rietveld 408576698