mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-03 05:44:10 -08:00
samples: fix rendering stopped when changing worker count or type
This commit is contained in:
parent
2bd76e2da5
commit
f3bf9d812f
2844
samples/kotlin-js-store/yarn.lock
Normal file
2844
samples/kotlin-js-store/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -102,12 +102,14 @@ class Controller(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onRenderComplete = { index, buffer ->
|
onRenderComplete = { index, buffer ->
|
||||||
buffers[index] = buffer
|
if (buffers[index] == null) {
|
||||||
if (--pending == 0) {
|
buffers[index] = buffer
|
||||||
performanceMeasure.endFrame()
|
if (--pending == 0) {
|
||||||
Window.requestAnimationFrame {
|
performanceMeasure.endFrame()
|
||||||
displayBuffers(buffers)
|
Window.requestAnimationFrame {
|
||||||
renderFrame()
|
displayBuffers(buffers)
|
||||||
|
renderFrame()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user