| Index: cc/base/switches.cc
|
| diff --git a/cc/base/switches.cc b/cc/base/switches.cc
|
| index 3fc43029c266cd1666695f7a90dc110953523bf7..3fa40e916ed91dc7793e3895b16df35b707d166e 100644
|
| --- a/cc/base/switches.cc
|
| +++ b/cc/base/switches.cc
|
| @@ -27,6 +27,16 @@ const char kDisableImplSidePainting[] = "disable-impl-side-painting";
|
| // Paint content on the compositor thread instead of the main thread.
|
| const char kEnableImplSidePainting[] = "enable-impl-side-painting";
|
|
|
| +// Disables the deadline scheduler.
|
| +// Overrides the kEnableDeadlineScheduling flag.
|
| +const char kDisableDeadlineScheduling[] = "disable-deadline-scheduling";
|
| +
|
| +// Deadline scheduling gives children compositors and the main thread an
|
| +// interval over which they can produce content instead of always consuming
|
| +// their input on the next BeginFrame. This allows a total pipeline latency
|
| +// of less than 1 vsync if their intervals are properly nested.
|
| +const char kEnableDeadlineScheduling[] = "enable-deadline-scheduling";
|
| +
|
| const char kEnableTopControlsPositionCalculation[] =
|
| "enable-top-controls-position-calculation";
|
|
|
| @@ -161,5 +171,20 @@ bool IsMapImageEnabled() {
|
| return false;
|
| }
|
|
|
| +bool IsDeadlineSchedulingEnabled() {
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| +
|
| + if (command_line.HasSwitch(cc::switches::kDisableDeadlineScheduling))
|
| + return false;
|
| + else if (command_line.HasSwitch(cc::switches::kEnableDeadlineScheduling))
|
| + return true;
|
| +
|
| +#if defined(OS_ANDROID)
|
| + return true;
|
| +#else
|
| + return false;
|
| +#endif
|
| +}
|
| +
|
| } // namespace switches
|
| } // namespace cc
|
|
|