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: cc/base/switches.cc

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Add an --enable-deadline-scheduler commandline flag. Created 7 years, 4 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
Index: cc/base/switches.cc
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index 2dac58b691147a9b073b87274984fad8c5f9099d..a4069c034874b4ef2fda964e29d3d96acc4abcd4 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 kDisableDeadlineShceduling 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";
@@ -146,5 +156,20 @@ bool IsImplSidePaintingEnabled() {
#endif
}
+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
« no previous file with comments | « cc/base/switches.h ('k') | cc/output/begin_frame_args.h » ('j') | cc/scheduler/scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698