Skip to content

Commit 49db609

Browse files
authored
[Impeller] Present Impeller contents in a transaction when there is a platform view (flutter#37809)
1 parent 09b82e0 commit 49db609

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

shell/platform/darwin/ios/ios_surface_metal_impeller.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@
4848
if (!CGSizeEqualToSize(drawable_size, layer.drawableSize)) {
4949
layer.drawableSize = drawable_size;
5050
}
51+
52+
// When there are platform views in the scene, the drawable needs to be presented in the same
53+
// transaction as the one created for platform views. When the drawable are being presented from
54+
// the raster thread, there is no such transaction.
55+
layer.presentsWithTransaction = [[NSThread currentThread] isMainThread];
56+
5157
return layer;
5258
}
5359

0 commit comments

Comments
 (0)