Moves frame dropping logs from 20ms to 33ms give than many videos make the UI run at 30fps

This commit is contained in:
Vitor Pamplona 2024-07-17 09:09:19 -04:00
parent e578327c5b
commit bc6d5060cb

View File

@ -183,7 +183,8 @@ object ChoreographerHelper {
return
}
val diff = (frameTimeNanos - lastFrameTimeNanos) / 1000000
if (diff > 20) {
// only report after 30ms because videos play at 30fps
if (diff > 35) {
// Follow the frame number
val droppedCount = (diff / 16.6).toInt()
Log.w("block-canary", "Dropped $droppedCount frames. Skipped $diff ms")