简体   繁体   中英

What does 60 FPS mean for Android/IOS devices?

On Android devices, if an app is running at exactly 60 fps, does that mean the app should be able to have up to 60 distinct, full images displayed on the device screen per second? Or up to only 30 distinct, full images because of interleaving necessary to complete one full image?

How about IOS devices?

60 FPS = 60 frames per second = 60 "images" per second. So yes, it means your app/game is capable of rendering at least 60 images per second.

Android works hard to synchronize user interface redraws with the hardware refresh rate. This means that it aims to redraw at 60 frames per-second.

As already explained above, a 60 FPS = 60 frames per second = 60 "images" per second, but I would also like to explain what it means.

In order to make things easier on the developer, Android apps have a Single User Interface thread. This thread is responsible for getting from the various sensors and setting up the next frame to draw. To run at an ideal 60 Frames Per Second, we need to make sure all the computations between draws takes less than 17ms, which is pretty fast! In other words, we want to do as little as possible on this main thread, but networking can take seconds which means your app would be frozen for all that time if the networking call is on the main thread. The user could not interact with it. After 5 seconds of ignoring user's input, Android would actually prompt the user to close your app.

So to use network, we need to run the network task on a secondary execution thread, but we need to make changes to the UI, like setting the text view to to show the result in the UI thread. Fortunately, Android provides a helpful framework pattern to do this and that's AsyncTask.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM