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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1589463002: compositor worker: Use a WebThread for the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self-nits Created 4 years, 11 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 db1591c407bfda3a28758117657834259d1a42cc..c9b4135f82263858842399ed203bd2966304189a 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -895,7 +895,7 @@ void RenderThreadImpl::Shutdown() {
media_thread_.reset();
- blink_platform_impl_->set_compositor_thread(nullptr);
+ blink_platform_impl_->reset_compositor_thread();
compositor_thread_.reset();
@@ -1148,14 +1148,8 @@ void RenderThreadImpl::InitializeCompositorThread() {
}
#endif
if (!compositor_task_runner_.get()) {
-
- compositor_thread_.reset(new base::Thread("Compositor"));
- base::Thread::Options compositor_thread_options;
-#if defined(OS_ANDROID)
- compositor_thread_options.priority = base::ThreadPriority::DISPLAY;
-#endif
- compositor_thread_->StartWithOptions(compositor_thread_options);
- compositor_task_runner_ = compositor_thread_->task_runner();
+ compositor_thread_ = blink_platform_impl_->createCompositorThread();
+ compositor_task_runner_ = compositor_thread_->TaskRunner();
compositor_task_runner_->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed),

Powered by Google App Engine
This is Rietveld 408576698