mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-05 19:28:46 +02:00
metal transaction
This commit is contained in:
parent
1793490519
commit
5b8e5e0f95
1 changed files with 10 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue