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; |