You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param retrieveCanvas Callback to lazily retrieve canvas to postpone drawable acquiring.
152
152
* @param targetTimestamp Timestamp indicating the expected draw result presentation time. Implementation should forward its internal time clock to this targetTimestamp to achieve smooth visual change cadence.
@@ -346,14 +372,12 @@ internal class MetalRedrawer(
346
372
// If there are pending changes in UIKit interop, [waitUntilScheduled](https://developer.apple.com/documentation/metal/mtlcommandbuffer/1443036-waituntilscheduled) is called
347
373
// to ensure that transaction is available
348
374
commandBuffer.waitUntilScheduled()
349
-
metalDrawable.present()
375
+
nonNullFrameRenderTarget.drawable.present()
350
376
caTransactionCommands.fastForEach { it.invoke() }
351
377
CATransaction.flush()
352
378
}
353
379
354
-
surface.close()
355
-
renderTarget.close()
356
-
// TODO manually release metalDrawable when K/N API arrives
380
+
nonNullFrameRenderTarget.dispose()
357
381
358
382
// Track current inflight command buffers to synchronously wait for their schedule in case app goes background
359
383
if (inflightCommandBuffers.size == metalLayer.maximumDrawableCount.toInt()) {
0 commit comments