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

Unified Diff: views/desktop/desktop_window_view.cc

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 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
« no previous file with comments | « ui/gfx/compositor/test_layer_animation_delegate.cc ('k') | views/layer_property_setter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/desktop/desktop_window_view.cc
diff --git a/views/desktop/desktop_window_view.cc b/views/desktop/desktop_window_view.cc
index 24f02491daff2f7b9c1a0854b7bb5e695e02d3ad..65d4801cf123e74b0747cec012a348ccddb29bab 100644
--- a/views/desktop/desktop_window_view.cc
+++ b/views/desktop/desktop_window_view.cc
@@ -7,9 +7,10 @@
#include "base/utf_string_conversions.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/transform.h"
+#include "ui/gfx/compositor/layer.h"
+#include "ui/gfx/compositor/layer_animator.h"
#include "views/desktop/desktop_background.h"
#include "views/desktop/desktop_window_manager.h"
-#include "views/layer_property_setter.h"
#include "views/widget/native_widget_view.h"
#include "views/widget/native_widget_views.h"
#include "views/widget/widget.h"
@@ -160,12 +161,20 @@ void DesktopWindowView::CreateTestWindow(const string16& title,
initial_bounds);
window->Show();
+ NativeWidgetViews* native_widget_views =
+ static_cast<NativeWidgetViews*>(window->native_widget());
+
if (rotate) {
ui::Transform transform;
transform.SetRotate(90.0f);
transform.SetTranslateX(window->GetWindowScreenBounds().width());
- static_cast<NativeWidgetViews*>(window->native_widget())->GetView()->
- SetTransform(transform);
+ native_widget_views->GetView()->SetTransform(transform);
+ }
+
+ native_widget_views->GetView()->SetPaintToLayer(true);
+ if (native_widget_views->GetView()->layer()) {
+ native_widget_views->GetView()->layer()->SetAnimator(
+ ui::LayerAnimator::CreateImplicitAnimator());
}
}
« no previous file with comments | « ui/gfx/compositor/test_layer_animation_delegate.cc ('k') | views/layer_property_setter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698