Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions shell/platform/darwin/ios/ios_surface_metal_impeller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
if (!CGSizeEqualToSize(drawable_size, layer.drawableSize)) {
layer.drawableSize = drawable_size;
}

// When there are platform views in the scene, the drawable needs to be presented in the same
// transaction as the one created for platform views. When the drawable are being presented from
// the raster thread, there is no such transaction.
layer.presentsWithTransaction = [[NSThread currentThread] isMainThread];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a separate patch perhaps, we should put this in the base implementation of the iOS surface shared by both Skia and Impeller. The models are identical.

Not sure re. testing. We could test that we present with transaction when not on the main thread. But that this is the fix for tearing, I wouldn't know how to test that.


return layer;
}

Expand Down