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

Unified Diff: ash/wm/workspace/workspace_animations.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | chrome/browser/chromeos/login/base_login_display_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_animations.cc
diff --git a/ash/wm/workspace/workspace_animations.cc b/ash/wm/workspace/workspace_animations.cc
index 745adf8f35bb394805125bf899784eb80fd998e2..ae93f6b68137a8bc58b046e8b5996e0fbcaf32eb 100644
--- a/ash/wm/workspace/workspace_animations.cc
+++ b/ash/wm/workspace/workspace_animations.cc
@@ -33,7 +33,7 @@ enum WorkspaceScaleType {
void ApplyWorkspaceScale(ui::Layer* layer, WorkspaceScaleType type) {
const float scale = type == WORKSPACE_SCALE_ABOVE ? kWorkspaceScaleAbove :
kWorkspaceScaleBelow;
- ui::Transform transform;
+ gfx::Transform transform;
transform.ConcatScale(scale, scale);
transform.ConcatTranslate(
-layer->bounds().width() * (scale - 1.0f) / 2,
@@ -70,7 +70,7 @@ void ShowWorkspace(aura::Window* window,
if (!details.animate || CommandLine::ForCurrentProcess()->HasSwitch(
ash::switches::kAshWindowAnimationsDisabled)) {
window->layer()->SetOpacity(1.0f);
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
return;
}
@@ -80,7 +80,7 @@ void ShowWorkspace(aura::Window* window,
details.direction == WORKSPACE_ANIMATE_UP ?
WORKSPACE_SCALE_BELOW : WORKSPACE_SCALE_ABOVE);
} else {
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
}
// In order for pause to work we need to stop animations.
@@ -102,14 +102,14 @@ void ShowWorkspace(aura::Window* window,
settings.SetTweenType(kWorkspaceTweenType);
settings.SetTransitionDuration(DurationForWorkspaceShowOrHide(details));
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
window->layer()->SetOpacity(1.0f);
}
}
void HideWorkspace(aura::Window* window,
const WorkspaceAnimationDetails& details) {
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
window->layer()->SetOpacity(1.0f);
window->layer()->GetAnimator()->StopAnimating();
@@ -138,7 +138,7 @@ void HideWorkspace(aura::Window* window,
details.direction == WORKSPACE_ANIMATE_UP ?
WORKSPACE_SCALE_ABOVE : WORKSPACE_SCALE_BELOW);
} else {
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
}
// NOTE: Hide() must be before SetOpacity(), else
@@ -154,7 +154,7 @@ void HideWorkspace(aura::Window* window,
// version.
settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
settings.SetTransitionDuration(base::TimeDelta());
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
}
} // namespace internal
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | chrome/browser/chromeos/login/base_login_display_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698