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

Unified Diff: ui/aura/desktop.cc

Issue 8558030: Prepare Chromium for WebCompositor::initialize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index dab97c711020f9dbea57597a7ffb330795c4b22d..056ab3d53c7e0328e35ac8566dd777f43241b228 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -31,6 +31,10 @@
#include "ui/gfx/compositor/screen_rotation.h"
#include "ui/gfx/interpolated_transform.h"
+#ifdef USE_WEBKIT_COMPOSITOR
+#include "ui/gfx/compositor/compositor_cc.h"
+#endif
+
using std::string;
using std::vector;
@@ -168,6 +172,9 @@ Desktop::Desktop()
if (ui::Compositor::compositor_factory()) {
compositor_ = (*ui::Compositor::compositor_factory())(this);
} else {
+#ifdef USE_WEBKIT_COMPOSITOR
+ ui::CompositorCC::Initialize(false);
+#endif
compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(),
host_->GetSize());
}
@@ -176,6 +183,10 @@ Desktop::Desktop()
Desktop::~Desktop() {
in_destructor_ = true;
+#ifdef USE_WEBKIT_COMPOSITOR
+ if (!compositor_factory_)
+ ui::CompositorCC::Terminate();
+#endif
if (instance_ == this)
instance_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698