Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Update surface_mtl.mm
  • Loading branch information
Jonah Williams authored Sep 21, 2023
commit b1840f78cff9aad464293f0e598d9f8663664ccf
1 change: 1 addition & 0 deletions impeller/renderer/backend/metal/surface_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
// transaction/capture work correctly.
if ([[NSThread currentThread] isMainThread] ||
Copy link
Member

Choose a reason for hiding this comment

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

Would this check work if a custom embedder launched the engine in a thread other than the main thread?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think technically this only needs to match wherever we set the layer to presentsWithTransaction. But I suspect that is only for iOS? I'll have to check how macOS desktop is doing.

[[MTLCaptureManager sharedCaptureManager] isCapturing]) {
TRACE_EVENT0("flutter", "waitUntilScheduled");
[command_buffer commit];
[command_buffer waitUntilScheduled];
[drawable_ present];
Expand Down