File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -467,16 +467,19 @@ RasterStatus Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) {
467467
468468 FireNextFrameCallbackIfPresent ();
469469
470- if (surface_->GetContext ()) {
471- TRACE_EVENT0 (" flutter" , " PerformDeferredSkiaCleanup" );
472- surface_->GetContext ()->performDeferredCleanup (kSkiaCleanupExpiration );
473- }
474-
475470 // Clear the render context after submitting the frame.
476471 // This ensures that the GL context is released after drawing to the
477472 // surface.
473+ //
474+ // The GL context must be clear before performing Gr context deferred
475+ // cleanup.
478476 surface_->ClearRenderContext ();
479477
478+ if (surface_->GetContext ()) {
479+ TRACE_EVENT0 (" flutter" , " PerformDeferredSkiaCleanup" );
480+ surface_->GetContext ()->performDeferredCleanup (kSkiaCleanupExpiration );
481+ }
482+
480483 return raster_status;
481484 }
482485
You can’t perform that action at this time.
0 commit comments