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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 12356002: [NOT FOR COMMIT] Hacks to merge render compositor thread with UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 54800f234880975782a5eeda75aa4cc2e4663ad5..bf35baf0efb7846f14cdf5f964b236db313c917e 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -117,6 +117,11 @@
#include "third_party/webrtc/system_wrappers/interface/event_tracer.h"
#endif
+#include "content/public/browser/browser_thread.h"
+#include "chrome/browser/metrics/thread_watcher.h"
+
+
+
using WebKit::WebDocument;
using WebKit::WebFrame;
using WebKit::WebNetworkStateNotifier;
@@ -604,7 +609,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing);
if (enable) {
- compositor_thread_.reset(new CompositorThread(this));
+ compositor_thread_.reset(new CompositorThread(this, BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::UI)));
AddFilter(compositor_thread_->GetMessageFilter());
compositor_support->initialize(compositor_thread_->GetWebThread());
} else {
@@ -883,7 +888,7 @@ void RenderThreadImpl::OnGpuVDAContextLoss() {
if (!self->gpu_vda_context3d_.get())
return;
if (self->compositor_thread()) {
- self->compositor_thread()->GetWebThread()->message_loop()->DeleteSoon(
+ BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::UI)->DeleteSoon(
FROM_HERE, self->gpu_vda_context3d_.release());
} else {
self->gpu_vda_context3d_.reset();

Powered by Google App Engine
This is Rietveld 408576698