Janin zah
Janin zah

Reputation: 201

Is it possible to bypass Android's surfaceflinger?

I asked a related question recently, but I forgot to ask this question explicitly.

(I want to implement a double-buffer scheme in an Android app using OpenGL ES 2.0, and Android's default scheme seems a little too unpredictable.)

Upvotes: 3

Views: 3005

Answers (1)

fadden
fadden

Reputation: 52313

The only way to bypass SurfaceFlinger is to root your device and shut the entire application framework down. You then have to interface with the hardware composer HAL -- simply using the framebuffer dev won't work on all devices.

SurfaceFlinger's behavior is very predictable so long as nothing much else is going on. There's always something else going on, of course, but that's true whether or not you composite through SurfaceFlinger.

As mentioned in another question (possibly yours), GLES on Android is at least double-buffered (eglSwapBuffers()), so there is no need for you to implement anything to get that behavior.

Upvotes: 4

Related Questions