Commit 291fd86a authored by ernstm's avatar ernstm Committed by Commit bot

Enable V8 idle notification after commit.

Enable the notification by default. Change flag
--send-v8-idle-notification-after-commit to
--enable-v8-idle-notification-after-commit. Add new flag
--disable-v8-idle-notification-after-commit to override enable or
default.

R=jochen@chromium.org,hpayer@chromium.org,jamesr@chromium.org,danno@chromium.org
BUG=414815

Review URL: https://codereview.chromium.org/566733004

Cr-Commit-Position: refs/heads/master@{#295540}
parent 212c44ec
......@@ -1091,6 +1091,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableTouchAdjustment,
switches::kDisableTouchDragDrop,
switches::kDisableTouchEditing,
switches::kDisableV8IdleNotificationAfterCommit,
switches::kDisableZeroCopy,
switches::kDomAutomationController,
switches::kEnableBeginFrameScheduling,
......@@ -1128,6 +1129,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableThreadedCompositing,
switches::kEnableTouchDragDrop,
switches::kEnableTouchEditing,
switches::kEnableV8IdleNotificationAfterCommit,
switches::kEnableViewport,
switches::kEnableViewportMeta,
switches::kEnableVtune,
......@@ -1153,7 +1155,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kRegisterPepperPlugins,
switches::kRendererAssertTest,
switches::kRendererStartupDialog,
switches::kSendV8IdleNotificationAfterCommit,
switches::kShowPaintRects,
switches::kSitePerProcess,
switches::kStatsCollectionController,
......
......@@ -250,6 +250,11 @@ const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
// Disable multithreaded GPU compositing of web content.
const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
// Disable V8 idle notification after commit.
// Overrides kEnableV8IdleNotificationAfterCommit.
const char kDisableV8IdleNotificationAfterCommit[] =
"disable-v8-idle-notification-after-commit";
// Don't enforce the same-origin policy. (Used by people testing their sites.)
const char kDisableWebSecurity[] = "disable-web-security";
......@@ -455,6 +460,14 @@ const char kEnableUserMediaScreenCapturing[] =
// Enables streaming scripts to V8 while loading.
const char kEnableV8ScriptStreaming[] = "enable-v8-script-streaming";
// Send a notification from RenderWidgetCompositor to V8 to do idle work
// (e.g. garbage collection) after the commit until the beginning of the next
// frame. This moves the work off the critical path where compositor is waiting
// for the main thread. The flag is experimental until the implementation of the
// V8 idle handler is completed.
const char kEnableV8IdleNotificationAfterCommit[] =
"enable-v8-idle-notification-after-commit";
// Enables the use of the @viewport CSS rule, which allows
// pages to control aspects of their own layout. This also turns on touch-screen
// pinch gestures.
......@@ -692,14 +705,6 @@ const char kSandboxIPCProcess[] = "sandbox-ipc";
// Defaults to disabled.
const char kScrollEndEffect[] = "scroll-end-effect";
// Send a notification from RenderWidgetCompositor to V8 to do idle work
// (e.g. garbage collection) after the commit until the beginning of the next
// frame. This moves the work off the critical path where compositor is waiting
// for the main thread. The flag is experimental until the implementation of the
// V8 idle handler is completed.
const char kSendV8IdleNotificationAfterCommit[] =
"send-v8-idle-notification-after-commit";
// Visibly render a border around paint rects in the web page to help debug
// and study painting behavior.
const char kShowPaintRects[] = "show-paint-rects";
......
......@@ -82,6 +82,7 @@ CONTENT_EXPORT extern const char kDisableSingleThreadProxyScheduler[];
CONTENT_EXPORT extern const char kDisableSmoothScrolling[];
CONTENT_EXPORT extern const char kDisableSoftwareRasterizer[];
CONTENT_EXPORT extern const char kDisableThreadedCompositing[];
extern const char kDisableV8IdleNotificationAfterCommit[];
CONTENT_EXPORT extern const char kDisableWebSecurity[];
extern const char kDisableXSLT[];
extern const char kDisableXSSAuditor[];
......@@ -134,6 +135,7 @@ CONTENT_EXPORT extern const char kEnableTracing[];
CONTENT_EXPORT extern const char kEnableTracingOutput[];
CONTENT_EXPORT extern const char kEnableUserMediaScreenCapturing[];
extern const char kEnableV8ScriptStreaming[];
extern const char kEnableV8IdleNotificationAfterCommit[];
CONTENT_EXPORT extern const char kEnableViewport[];
CONTENT_EXPORT extern const char kEnableViewportMeta[];
CONTENT_EXPORT extern const char kMainFrameResizesAreOrientationChanges[];
......@@ -198,7 +200,6 @@ CONTENT_EXPORT extern const char kRendererProcessLimit[];
CONTENT_EXPORT extern const char kRendererStartupDialog[];
extern const char kSandboxIPCProcess[];
CONTENT_EXPORT extern const char kScrollEndEffect[];
extern const char kSendV8IdleNotificationAfterCommit[];
extern const char kShowPaintRects[];
CONTENT_EXPORT extern const char kSingleProcess[];
CONTENT_EXPORT extern const char kSitePerProcess[];
......
......@@ -423,11 +423,13 @@ RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget,
bool threaded)
: threaded_(threaded),
widget_(widget),
send_v8_idle_notification_after_commit_(false) {
send_v8_idle_notification_after_commit_(true) {
CommandLine* cmd = CommandLine::ForCurrentProcess();
if (cmd->HasSwitch(switches::kSendV8IdleNotificationAfterCommit))
if (cmd->HasSwitch(switches::kEnableV8IdleNotificationAfterCommit))
send_v8_idle_notification_after_commit_ = true;
if (cmd->HasSwitch(switches::kDisableV8IdleNotificationAfterCommit))
send_v8_idle_notification_after_commit_ = false;
}
RenderWidgetCompositor::~RenderWidgetCompositor() {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment