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

Unified Diff: cc/scheduler/scheduler.cc

Issue 579083002: Small adjustment of tracing for discarded retro frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 5bbd1a2dc425aabbb5b0fd76a9aea78676a130fe..267b9e7f8fb841bb5b77bc16f377edc6a77f6360 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -458,13 +458,19 @@ void Scheduler::BeginRetroFrame() {
// up, our fallback should be to lower our frame rate.
base::TimeTicks now = Now();
base::TimeDelta draw_duration_estimate = client_->DrawDurationEstimate();
- while (!begin_retro_frame_args_.empty() &&
- now > AdjustedBeginImplFrameDeadline(begin_retro_frame_args_.front(),
- draw_duration_estimate)) {
- TRACE_EVENT1("cc",
- "Scheduler::BeginRetroFrame discarding",
- "frame_time",
- begin_retro_frame_args_.front().frame_time);
+ while (!begin_retro_frame_args_.empty()) {
+ base::TimeTicks adjusted_deadline = AdjustedBeginImplFrameDeadline(
+ begin_retro_frame_args_.front(), draw_duration_estimate);
+ if (now < adjusted_deadline)
Sami 2014/09/18 10:22:34 nit: This should be "<=" to match the previous beh
+ break;
+
+ TRACE_EVENT_INSTANT2("cc",
+ "Scheduler::BeginRetroFrame discarding",
+ TRACE_EVENT_SCOPE_THREAD,
+ "deadline - now",
+ (adjusted_deadline - now).InMicroseconds(),
+ "BeginFrameArgs",
+ begin_retro_frame_args_.front().AsValue());
begin_retro_frame_args_.pop_front();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698