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

Unified Diff: ui/gfx/compositor/compositor_cc.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/gfx/compositor/compositor_cc.cc
diff --git a/ui/gfx/compositor/compositor_cc.cc b/ui/gfx/compositor/compositor_cc.cc
index ce757130e50bb064a4c1e8fff71912b5c94d9442..912076a92564c9e65dd65aa2706224c0c7dab92d 100644
--- a/ui/gfx/compositor/compositor_cc.cc
+++ b/ui/gfx/compositor/compositor_cc.cc
@@ -134,12 +134,21 @@ CompositorCC::CompositorCC(CompositorDelegate* delegate,
CompositorCC::~CompositorCC() {
}
-void CompositorCC::InitializeThread() {
- g_compositor_thread = new webkit_glue::WebThreadImpl("Browser Compositor");
- WebKit::WebCompositor::setThread(g_compositor_thread);
-}
-
-void CompositorCC::TerminateThread() {
+void CompositorCC::Initialize(bool use_thread) {
+ if (use_thread)
+ g_compositor_thread = new webkit_glue::WebThreadImpl("Browser Compositor");
+#if WEBCOMPOSITOR_HAS_INITIALIZE
+ WebKit::WebCompositor::initialize(g_compositor_thread);
+#else
+ if (use_thread)
+ WebKit::WebCompositor::setThread(g_compositor_thread);
+#endif
+}
+
+void CompositorCC::Terminate() {
+#if WEBCOMPOSITOR_HAS_INITIALIZE
+ WebKit::WebCompositor::shutdown();
+#endif
DCHECK(g_compositor_thread);
piman 2011/11/18 23:21:56 remove DCHECK, since it'll fail if use_thread == f
delete g_compositor_thread;
g_compositor_thread = NULL;

Powered by Google App Engine
This is Rietveld 408576698