Monday, January 30, 2017

Android OpenGL occasional stutter

Leave a Comment

I've written an OpenGL ES 2 app using NativeActivity that renders around 6 textured triangles that you can drag around using touch input. The app is rendering as fast as possible, calling glClear() before and eglSwapBuffers() after rendering. As expected the frame rate is capped to the display frequency of around 60 fps and the scene moves around smoothly. However, after some time (10 to 60 seconds) the movement starts to stutter even though the frame rate is still 60 fps. The device I'm using is OnePlus 3.

At first I suspected the culprit was battery saving mode, but investigation revealed no correlation between cpus' frequencies and the stutter.

I did notice something interesting though, the stutter starts when queueBuffer() execution time goes up.

This is the systrace before stutter: Before stutter This is the systrace after stutter: After stutter This is the systrace during the transition from before to after: Transition

How do I stop the app from stuttering?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment