Skip to content

Commit

Permalink
fix: AA: revert changes related to rendering thread
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Sep 9, 2023
1 parent 6ad7561 commit 0b5f6d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/org/obd/graphs/RenderingThread.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RenderingThread(renderAction: () -> Unit,private val perfFrameRate: () ->
}

fun isRunning(): Boolean {
return tasks != null && running
return tasks != null && !tasks!!.isDone
}

fun start() {
Expand All @@ -53,7 +53,7 @@ class RenderingThread(renderAction: () -> Unit,private val perfFrameRate: () ->
val fps = perfFrameRate()
Log.d(LOG_KEY, "Expected surface FPS $fps")
val targetDelay = 1000 / fps
while (running) {
while (!Thread.currentThread().isInterrupted) {
var ts = System.currentTimeMillis()
handler.sendEmptyMessage(MSG_RENDER_FRAME)
ts = System.currentTimeMillis() - ts
Expand Down

0 comments on commit 0b5f6d0

Please sign in to comment.