From b3fb01c80b0fb6ac8bfe5d3ca90054fb164e407b Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Wed, 7 Jul 2021 17:56:02 +0200 Subject: [PATCH] MacOS (metal): Block raster thread instead of platform thread. (flutter/engine#27191) --- .../Source/FlutterResizableBackingStoreProvider.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterResizableBackingStoreProvider.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterResizableBackingStoreProvider.mm index 14988a0613f..1d4c2921e83 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterResizableBackingStoreProvider.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterResizableBackingStoreProvider.mm @@ -78,16 +78,15 @@ } - (void)resizeSynchronizerFlush:(nonnull FlutterResizeSynchronizer*)synchronizer { - // no-op when using Metal rendering backend. + id commandBuffer = [_commandQueue commandBuffer]; + [commandBuffer commit]; + [commandBuffer waitUntilScheduled]; } - (void)resizeSynchronizerCommit:(nonnull FlutterResizeSynchronizer*)synchronizer { [CATransaction begin]; [CATransaction setDisableActions:YES]; - id commandBuffer = [_commandQueue commandBuffer]; - [commandBuffer commit]; - [commandBuffer waitUntilScheduled]; [_surfaceManager swapBuffers]; [CATransaction commit];