MacOS (metal): Block raster thread instead of platform thread. (flutter/engine#27191)

This commit is contained in:
Matej Knopp 2021-07-07 17:56:02 +02:00 committed by GitHub
parent 1e86cd92e2
commit b3fb01c80b

View File

@ -78,16 +78,15 @@
}
- (void)resizeSynchronizerFlush:(nonnull FlutterResizeSynchronizer*)synchronizer {
// no-op when using Metal rendering backend.
id<MTLCommandBuffer> commandBuffer = [_commandQueue commandBuffer];
[commandBuffer commit];
[commandBuffer waitUntilScheduled];
}
- (void)resizeSynchronizerCommit:(nonnull FlutterResizeSynchronizer*)synchronizer {
[CATransaction begin];
[CATransaction setDisableActions:YES];
id<MTLCommandBuffer> commandBuffer = [_commandQueue commandBuffer];
[commandBuffer commit];
[commandBuffer waitUntilScheduled];
[_surfaceManager swapBuffers];
[CATransaction commit];