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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1449953002: compositor-worker: Refactor CompositorWorkerManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 3b17ea0d15a56e5544b8bd2492366bfa42f917d4..e6aa02201458a521a70ca6d8408899eebd6dac0a 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -39,7 +39,9 @@
#include "cc/blink/web_layer_impl.h"
#include "cc/layers/layer_settings.h"
#include "cc/raster/task_graph_runner.h"
+#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_settings.h"
+#include "components/scheduler/child/webthread_base.h"
#include "components/scheduler/renderer/renderer_scheduler.h"
#include "content/child/appcache/appcache_dispatcher.h"
#include "content/child/appcache/appcache_frontend_impl.h"
@@ -137,6 +139,7 @@
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "skia/ext/event_tracer_impl.h"
#include "skia/ext/skia_memory_dump_provider.h"
+#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebImageGenerator.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebThread.h"
@@ -1086,14 +1089,11 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
sync_compositor_factory->GetCompositorTaskRunner();
}
#endif
- if (!compositor_task_runner_) {
- 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();
+ if (!compositor_task_runner_.get()) {
+ compositor_thread_.reset(
+ blink::Platform::current()->createThreadForCompositor("Compositor"));
sadrul 2015/11/27 19:03:08 This can directly call into BlinkPlatformImpl thro
Ian Vollick 2015/11/27 19:56:11 Done.
+ compositor_task_runner_ = static_cast<scheduler::WebThreadBase*>(
+ compositor_thread_.get())->TaskRunner();
compositor_task_runner_->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed),

Powered by Google App Engine
This is Rietveld 408576698