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

Unified Diff: cc/output/begin_frame_args.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/output/begin_frame_args.cc
diff --git a/cc/output/begin_frame_args.cc b/cc/output/begin_frame_args.cc
index cefb22bdc1382aa20f6217a5f077fad39d5daa98..170b7cb7e52864e204cabab408206a9a6892c4f5 100644
--- a/cc/output/begin_frame_args.cc
+++ b/cc/output/begin_frame_args.cc
@@ -48,10 +48,13 @@ BeginFrameArgs BeginFrameArgs::CreateExpiredForTesting() {
DefaultInterval());
}
+// This is a hard-coded deadline adjustment, to be used in cases where
+// a good estimated draw time is not known. Using 1/3 of the vsync as the
+// default adjustment gives the Browser the last 1/3 of a frame to produce
+// output, the Renderer Impl thread the middle 1/3 of a frame to produce ouput,
+// and the Renderer Main thread the first 1/3 of a frame to produce output.
base::TimeDelta BeginFrameArgs::DefaultDeadlineAdjustment() {
- // Using a large deadline adjustment will effectively revert BeginFrame
- // scheduling to the hard vsync scheduling we used to have.
- return base::TimeDelta::FromSeconds(-1);
+ return base::TimeDelta::FromMicroseconds(-16666 / 3);
}
base::TimeDelta BeginFrameArgs::DefaultInterval() {
@@ -62,5 +65,4 @@ base::TimeDelta BeginFrameArgs::DefaultRetroactiveBeginFramePeriod() {
return base::TimeDelta::FromMicroseconds(4444);
}
-
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698