samples: fix rendering stopped when changing worker count or type

This commit is contained in:
Alexey Andreev 2023-11-25 14:05:01 +01:00
parent 2bd76e2da5
commit f3bf9d812f
2 changed files with 2852 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -102,6 +102,7 @@ class Controller(
})
}
onRenderComplete = { index, buffer ->
if (buffers[index] == null) {
buffers[index] = buffer
if (--pending == 0) {
performanceMeasure.endFrame()
@ -112,6 +113,7 @@ class Controller(
}
}
}
}
private fun displayBuffers(buffers: Array<out ArrayBuffer?>) {
for (y in 0 until height) {