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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 629243003: Forward compositor and input tasks to the Blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 55812846af3b46eaa526b84f84330b96379dfa87..769d5e38cd20a16db71615c298b98ea2a1b9959c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -839,7 +839,6 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
blink_platform_impl_.reset(new RendererBlinkPlatformImpl);
blink::initialize(blink_platform_impl_.get());
- main_thread_compositor_task_runner_ = base::MessageLoopProxy::current();
v8::Isolate* isolate = blink::mainThreadIsolate();
@@ -849,6 +848,14 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!command_line.HasSwitch(switches::kDisableBlinkScheduler)) {
+ main_thread_compositor_task_runner_ =
+ make_scoped_refptr(new SchedulerProxyTaskRunner<
+ &blink::WebSchedulerProxy::postCompositorTask>());
+ } else {
+ main_thread_compositor_task_runner_ = base::MessageLoopProxy::current();
+ }
+
picksi1 2014/10/08 12:44:37 Stylistic Nit: I'd favor swapping the if/else and
Sami 2014/10/08 12:54:32 Done.
bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing);
if (enable) {
#if defined(OS_ANDROID)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698