From 9524abd2e85ccc071effc3c999f1a1c55662def4 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Tue, 24 Mar 2020 19:02:07 -0700 Subject: [PATCH] Flush background canvas before allocating a new surface --- .../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 b96fcbbbaa76a..32c91c91e4077 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -451,6 +451,9 @@ 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);