mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
MacOS (metal): Block raster thread instead of platform thread. (flutter/engine#27191)
This commit is contained in:
parent
1e86cd92e2
commit
b3fb01c80b
@ -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];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user