Nikita Lipsky 3 days ago committed by GitHub
parent
commit
71e0b05336
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/MeasureComposable.kt

5
benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/MeasureComposable.kt

@ -56,8 +56,11 @@ suspend fun measureComposable(
// warmup
repeat(warmupCount) {
scene.render(canvas, it * nanosPerFrame)
surface.flushAndSubmit(false)
}
graphicsContext?.awaitGPUCompletion()
runGC()
var renderTime = Duration.ZERO
@ -65,8 +68,10 @@ suspend fun measureComposable(
renderTime = measureTime {
repeat(frameCount) {
scene.render(canvas, it * nanosPerFrame)
surface.flushAndSubmit(false)
}
}
graphicsContext?.awaitGPUCompletion()
}
val frames = MutableList(frameCount) {

Loading…
Cancel
Save