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

Unified Diff: content/renderer/scheduler/renderer_scheduler.cc

Issue 819623002: Enable Blink Scheduler (but not for WebView or ChromeOS) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Link bugs as requested. Created 6 years 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 | « android_webview/lib/main/aw_main_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/scheduler/renderer_scheduler.cc
diff --git a/content/renderer/scheduler/renderer_scheduler.cc b/content/renderer/scheduler/renderer_scheduler.cc
index ec30f7f5eb9f26b4d74ed194d60009c7f5fa7d10..56e29f568d44893e015f7ad5a52962bf0b0ca543 100644
--- a/content/renderer/scheduler/renderer_scheduler.cc
+++ b/content/renderer/scheduler/renderer_scheduler.cc
@@ -4,7 +4,11 @@
#include "content/renderer/scheduler/renderer_scheduler.h"
+#include "base/command_line.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "content/public/common/content_switches.h"
#include "content/renderer/scheduler/null_renderer_scheduler.h"
+#include "content/renderer/scheduler/renderer_scheduler_impl.h"
namespace content {
@@ -16,8 +20,19 @@ RendererScheduler::~RendererScheduler() {
// static
scoped_ptr<RendererScheduler> RendererScheduler::Create() {
- // TODO(rmcilroy): Use the RendererSchedulerImpl when the scheduler is enabled
+ // FIXME: Some chromeos browser tests timeout with the scheduler enabled.
+ // See crbug.com/444574
+#ifdef OS_CHROMEOS
return make_scoped_ptr(new NullRendererScheduler());
+#endif
+
+ CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kDisableBlinkScheduler)) {
+ return make_scoped_ptr(new NullRendererScheduler());
+ } else {
+ return make_scoped_ptr(
+ new RendererSchedulerImpl(base::MessageLoopProxy::current()));
+ }
}
} // namespace content
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698