Commit 432fefd5 authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

[throughput] Turn a if into a DCHECK

Right now in the ReportMainFrameCausedNoDamage, we set the
begin_main_frame_data_.previous_sequence to 0 only if the frame
args is the same as the current main-frame args.

This CL turns the if statement into a DCHECK. It basically means:
if the no-damage report comes, it must come before the next
ReportBeginMainFrame.

Bug: None
Change-Id: I6c02855c5fac4721a430cd03610c8ead17d8a411
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105400
Auto-Submit: Xida Chen <xidachen@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751176}
parent 53b7c253
......@@ -941,8 +941,13 @@ void FrameSequenceTracker::ReportMainFrameCausedNoDamage(
DCHECK_GE(main_throughput().frames_expected, main_frames_.size())
<< TRACKER_DCHECK_MSG;
if (begin_main_frame_data_.previous_sequence == args.frame_id.sequence_number)
begin_main_frame_data_.previous_sequence = 0;
// Could be 0 if there were a pause frame production.
if (begin_main_frame_data_.previous_sequence != 0) {
DCHECK_EQ(begin_main_frame_data_.previous_sequence,
args.frame_id.sequence_number)
<< TRACKER_DCHECK_MSG;
}
begin_main_frame_data_.previous_sequence = 0;
}
void FrameSequenceTracker::PauseFrameProduction() {
......
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