Do not end the frame in the raster cache if ScopedFrame::Raster returns kResubmit (flutter/engine#40007)

Do not end the frame in the raster cache if ScopedFrame::Raster returns kResubmit
This commit is contained in:
Jason Simmons
2023-03-02 17:12:55 -08:00
committed by GitHub
parent 7aff51d95d
commit 719b8c319d

View File

@@ -604,7 +604,12 @@ RasterStatus Rasterizer::DrawToSurfaceUnsafe(
frame->Submit();
}
compositor_context_->raster_cache().EndFrame();
// Do not update raster cache metrics for kResubmit because that status
// indicates that the frame was not actually painted.
if (raster_status != RasterStatus::kResubmit) {
compositor_context_->raster_cache().EndFrame();
}
frame_timings_recorder.RecordRasterEnd(
&compositor_context_->raster_cache());
FireNextFrameCallbackIfPresent();