Commit 768f05e6 authored by behdad's avatar behdad Committed by Commit Bot

OnFinishImplFrame checks reporters in all stages

OnFinishImplFrame call might happen when the corresponding frame is in a
stage rather than BeginImpl or BeginMain. This change checks for the
other reporters as well.

Bug: chromium:1067245
Change-Id: I9b30c78ed5d43397f94ec627c2f7bd099a92f522
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133868Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Auto-Submit: Behdad Bakhshinategh <behdadb@chromium.org>
Commit-Queue: Behdad Bakhshinategh <behdadb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755844}
parent 37b1f768
......@@ -232,12 +232,11 @@ void CompositorFrameReportingController::DidNotProduceFrame(
void CompositorFrameReportingController::OnFinishImplFrame(
const viz::BeginFrameId& id) {
if (reporters_[PipelineStage::kBeginImplFrame]) {
DCHECK_EQ(reporters_[PipelineStage::kBeginImplFrame]->frame_id_, id);
reporters_[PipelineStage::kBeginImplFrame]->OnFinishImplFrame(Now());
} else if (reporters_[PipelineStage::kBeginMainFrame]) {
DCHECK_EQ(reporters_[PipelineStage::kBeginMainFrame]->frame_id_, id);
reporters_[PipelineStage::kBeginMainFrame]->OnFinishImplFrame(Now());
for (auto& reporter : reporters_) {
if (reporter && reporter->frame_id_ == id) {
reporter->OnFinishImplFrame(Now());
return;
}
}
}
......
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