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

Unified Diff: ui/aura_shell/shell.cc

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable framework for aura Created 9 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
Index: ui/aura_shell/shell.cc
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index aa2798dfdb732ad61c5f502417c5cb9810e0aaf0..a4c091f7bca3c133fde601761c12fa6cb58862d1 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -18,6 +18,7 @@
#include "ui/aura_shell/shell_window_ids.h"
#include "ui/base/view_prop.h"
#include "ui/gfx/compositor/layer.h"
+#include "ui/gfx/compositor/layer_animator.h"
#include "views/widget/native_widget_aura.h"
#include "views/widget/widget.h"
@@ -209,8 +210,9 @@ void Shell::TileWindows() {
for (size_t i = 0; i < bounds.size(); ++i) {
to_restore_.push_back(
std::make_pair(bounds[i].first, bounds[i].first->bounds()));
- bounds[i].first->layer()->SetAnimation(
- aura::Window::CreateDefaultAnimation());
+ ui::LayerAnimator::TransientSettings settings(
+ bounds[i].first->layer()->GetAnimator());
+ aura::Window::ApplyDefaultAnimationSettings(&settings);
bounds[i].first->SetBounds(bounds[i].second);
bounds[i].first->layer()->SetTransform(transform);
bounds[i].first->layer()->SetOpacity(0.5f);
@@ -225,8 +227,9 @@ void Shell::TileWindows() {
void Shell::RestoreTiledWindows() {
ui::Transform identity_transform;
for (size_t i = 0; i < to_restore_.size(); ++i) {
- to_restore_[i].first->layer()->SetAnimation(
- aura::Window::CreateDefaultAnimation());
+ ui::LayerAnimator::TransientSettings settings(
+ to_restore_[i].first->layer()->GetAnimator());
+ aura::Window::ApplyDefaultAnimationSettings(&settings);
to_restore_[i].first->SetBounds(to_restore_[i].second);
to_restore_[i].first->layer()->SetTransform(identity_transform);
to_restore_[i].first->layer()->SetOpacity(1.0f);
« no previous file with comments | « ui/aura/window.cc ('k') | ui/gfx/compositor/compositor.gyp » ('j') | ui/gfx/compositor/layer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698