metal transaction

This commit is contained in:
Mikhail Filimonov 2026-05-02 10:07:13 +01:00
parent 1793490519
commit 5b8e5e0f95

View file

@ -1073,12 +1073,20 @@ public final class MetalEngine {
#if targetEnvironment(simulator)
if #available(iOS 13.0, *) {
if let drawable = self.layer.nextDrawable() {
commandBuffer.present(drawable)
commandBuffer.addScheduledHandler { _ in
CATransaction.begin()
drawable.present()
CATransaction.commit()
}
}
}
#else
if let drawable = self.layer.nextDrawable() {
commandBuffer.present(drawable)
commandBuffer.addScheduledHandler { _ in
CATransaction.begin()
drawable.present()
CATransaction.commit()
}
}
#endif
#endif