Commit b561054a authored by behdad's avatar behdad Committed by Commit Bot

No missedFrame in case of no damage

If the reporter in the stage of beginImpl is replaced with a new
reporter, that means that Impl frame has caused no damage, and should
not be reported as MissedFrame.

Bug: chromium:1030304
Change-Id: I248a4dabf848e2ef6fc752c9388f60a6118092d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951651
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721874}
parent 0ba810ea
......@@ -52,8 +52,10 @@ base::TimeTicks CompositorFrameReportingController::Now() const {
void CompositorFrameReportingController::WillBeginImplFrame() {
base::TimeTicks begin_time = Now();
if (reporters_[PipelineStage::kBeginImplFrame]) {
// If the the reporter is replaced in this stage, it means that Impl frame
// caused no damage.
reporters_[PipelineStage::kBeginImplFrame]->TerminateFrame(
CompositorFrameReporter::FrameTerminationStatus::kReplacedByNewReporter,
CompositorFrameReporter::FrameTerminationStatus::kDidNotProduceFrame,
begin_time);
}
std::unique_ptr<CompositorFrameReporter> reporter =
......
......@@ -230,6 +230,15 @@ TEST_F(CompositorFrameReportingControllerTest,
"CompositorLatency.MissedFrame.EndActivateToSubmitCompositorFrame", 0);
}
TEST_F(CompositorFrameReportingControllerTest, ImplFrameCausedNoDamage) {
base::HistogramTester histogram_tester;
SimulateBeginImplFrame();
SimulateBeginImplFrame();
histogram_tester.ExpectTotalCount(
"CompositorLatency.MissedFrame.BeginImplFrameToSendBeginMainFrame", 0);
}
TEST_F(CompositorFrameReportingControllerTest, BlinkBreakdown) {
base::HistogramTester histogram_tester;
......
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