Commit 7deb2766 authored by mithro's avatar mithro Committed by Commit bot

Small adjustment of tracing for discarded retro frames.

Changes the trace to output to include;
 * How much the deadline was missed by.
 * The full BeginFrameArgs that was dropped.

BUG=346230

Review URL: https://codereview.chromium.org/579083002

Cr-Commit-Position: refs/heads/master@{#295631}
parent 9d9da8d4
...@@ -458,13 +458,19 @@ void Scheduler::BeginRetroFrame() { ...@@ -458,13 +458,19 @@ void Scheduler::BeginRetroFrame() {
// up, our fallback should be to lower our frame rate. // up, our fallback should be to lower our frame rate.
base::TimeTicks now = Now(); base::TimeTicks now = Now();
base::TimeDelta draw_duration_estimate = client_->DrawDurationEstimate(); base::TimeDelta draw_duration_estimate = client_->DrawDurationEstimate();
while (!begin_retro_frame_args_.empty() && while (!begin_retro_frame_args_.empty()) {
now > AdjustedBeginImplFrameDeadline(begin_retro_frame_args_.front(), base::TimeTicks adjusted_deadline = AdjustedBeginImplFrameDeadline(
draw_duration_estimate)) { begin_retro_frame_args_.front(), draw_duration_estimate);
TRACE_EVENT1("cc", if (now <= adjusted_deadline)
"Scheduler::BeginRetroFrame discarding", break;
"frame_time",
begin_retro_frame_args_.front().frame_time); 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(); begin_retro_frame_args_.pop_front();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment