From e2d9c6039344d8cec1444ac4fa2b8d0f95705adb Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Tue, 24 Mar 2020 20:10:10 -0700 Subject: [PATCH] Flush background canvas before allocating a new surface (#17308) --- .../darwin/ios/framework/Source/FlutterPlatformViews.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index b96fcbbba..32c91c91e 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -451,6 +451,9 @@ bool FlutterPlatformViewsController::SubmitFrame(GrContext* gr_context, std::shared_ptr ios_context, SkCanvas* background_canvas) { DisposeViews(); + + // Resolve all pending GPU operations before allocating a new surface. + background_canvas->flush(); // Clipping the background canvas before drawing the picture recorders requires to // save and restore the clip context. SkAutoCanvasRestore save(background_canvas, /*doSave=*/true); -- GitLab