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

Unified Diff: content/renderer/render_thread.cc

Issue 8081014: Initialize and set compositor thread in WebKit initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize WebThreadImpl directly Created 9 years, 3 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
« content/renderer/render_thread.h ('K') | « content/renderer/render_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread.cc
diff --git a/content/renderer/render_thread.cc b/content/renderer/render_thread.cc
index 53332b98e5919fcf17220ede39c4245435a97206..07a582e4b16ca68259b22f03eab9cdd4dd3b1750 100644
--- a/content/renderer/render_thread.cc
+++ b/content/renderer/render_thread.cc
@@ -64,12 +64,18 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebThread.h"
darin (slow to review) 2011/09/30 06:06:06 nit: this include should be unnecessary
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/ui_base_switches.h"
#include "v8/include/v8.h"
#include "webkit/extensions/v8/playback_extension.h"
#include "webkit/glue/webkit_glue.h"
+#ifdef HAVE_WEBCOMPOSITOR
+#include "webkit/glue/webthread_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
+#endif
+
// TODO(port)
#if defined(OS_WIN)
#include "content/common/child_process_messages.h"
@@ -438,6 +444,11 @@ void RenderThread::EnsureWebKitInitialized() {
webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl);
WebKit::initialize(webkit_platform_support_.get());
+#ifdef HAVE_WEBCOMPOSITOR
+ compositor_thread_.reset(new WebThreadImpl("Compositor"));
+ WebKit::WebCompositor::setThread(compositor_thread_.get());
+#endif
+
WebScriptController::enableV8SingleThreadMode();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
« content/renderer/render_thread.h ('K') | « content/renderer/render_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698