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) {
467
467
468
468
FireNextFrameCallbackIfPresent ();
469
469
470
- if (surface_->GetContext ()) {
471
- TRACE_EVENT0 (" flutter" , " PerformDeferredSkiaCleanup" );
472
- surface_->GetContext ()->performDeferredCleanup (kSkiaCleanupExpiration );
473
- }
474
-
475
470
// Clear the render context after submitting the frame.
476
471
// This ensures that the GL context is released after drawing to the
477
472
// surface.
473
+ //
474
+ // The GL context must be clear before performing Gr context deferred
475
+ // cleanup.
478
476
surface_->ClearRenderContext ();
479
477
478
+ if (surface_->GetContext ()) {
479
+ TRACE_EVENT0 (" flutter" , " PerformDeferredSkiaCleanup" );
480
+ surface_->GetContext ()->performDeferredCleanup (kSkiaCleanupExpiration );
481
+ }
482
+
480
483
return raster_status;
481
484
}
482
485
You can’t perform that action at this time.
0 commit comments