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

Unified Diff: cc/base/switches.cc

Issue 23796002: cc: Implement deadine scheduling disabled by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedReadback4
Patch Set: Enable by default on Aura Created 7 years, 3 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 | « cc/base/switches.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/switches.cc
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index e60414584cbe2f3bb9c0e27ad45fcb4d7605f9b9..9be959072d942f75dc939f3f1047cfe42dd0f18c 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -33,6 +33,16 @@ const char kEnableLCDText[] = "enable-lcd-text";
// 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";
@@ -181,5 +191,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) || defined (USE_AURA)
brianderson 2013/09/17 01:35:53 piman: Is it ok to enable by default on Aura using
+ return true;
+#else
+ return false;
+#endif
+}
+
} // namespace switches
} // namespace cc
« no previous file with comments | « cc/base/switches.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698