EglSwapBuffers is unstable / slow

I have a problem with very low rendering times on an Android tablet using the NDK and egl commands. I have temporary calls to eglSwapBuffers and it takes a variable time, often exceeding the frame rate of the device. I know that it synchronizes with the update, but it is about 60FPS, and the times here drop much lower.

The only command I issue between calls to exchange is glClear , so I know that this is not something that I draw, causing the problem. Even just cleaning the frame rate drops to 30FPS (albeit unstable).

On the same device, a simple GL program in Java is easily displayed on 60FPS, so I know that this is not a hardware problem. I looked at the Android Java code to set up the GL context and don't see a significant difference. I also played with every configuration attribute, and although some change the speed a little, not one (which I can find) changes this terrible frame rate.

To ensure that event polling was not a problem, I moved the rendering to a stream. This stream now only does rendering, so it just causes clarity and swap. Slow performance is still maintained.

I have no idea what to check and look for suggestions regarding the problem.

+7
source share
2 answers

In fact, there is not enough information (for example, which device you are testing, which configuration, etc.) to respond to this 100% reliable, but this behavior is usually caused by a mismatch between the window format and the pixel surface, for example. 16 bit (RGB565) vs 32 bit.

+3
source

FB_MULTI_BUFFER=3 environment variable will include multibuffering on the Freescale i.MX 6 (Sabrelite) board with the recent LTIB build (without X). Your GFX driver may need something like this.

0
source

All Articles