Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Android, if it took more than 16 ms to complete the work to draw a frame, when is the next frame actually ready?

To be specific, I'll present my question in an example:

Say at t = 0 ms, a frame was completed and became visible to the user on the screen. From that point on, I began the work to draw the next frame. However, the work took too long that I missed the frame's due time of t = 16 ms. If finally this next frame was ready at t = 23 ms. When would it actually be visible to the user? t = 23 ms or t = 32 ms (at the next drawing "heart beat" if any)?

And also, where in the Android source code can I find the answer myself?

like image 216
Zili FENG Avatar asked Oct 24 '25 15:10

Zili FENG


1 Answers

You actually get 16.666ms per frame, so if you aren't ready to draw at that point then the next attempt would be made at 34ms. Colt from Google has a good video explaining this actually. https://www.youtube.com/watch?v=HXQhu6qfTVU

like image 81
eclipse1203 Avatar answered Oct 27 '25 00:10

eclipse1203



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!