Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Graphics Internals

I haven't found a clear explanation on how the Android graphics system works, specifically, does it use a display server, is it based on DirectFB or X11, etc.

From what I've managed to piece together, Android depends on the Linux frame buffer. I haven't found much on what sort of display server or window manager Android uses to multiplex access to the framebuffer though, so any pointers would be much appreciated!

Finally, from what I understand the ARM instruction set provides instructions to accelerate OpenGL, but how this integrates with the display server isn't clear, ie. do client applications negotiate a shared memory buffer into which the client writes directly?

Are the OpenGL libraries for the platform accelerator open source? I've found some references suggesting they're closed source binaries. Again, any pointers would be appreciated.

like image 286
naasking Avatar asked Jan 02 '11 17:01

naasking


2 Answers

There are two core pieces to Android graphics: SurfaceFlinger and Skia. SurfaceFlinger is Android's compositor, used by the window manager to create and display windows (actually called surfaces.) SurfaceFlinger is implemented on top of OpenGL ES 1.x currently and can also use other hardware acceleration techniques when available (MDP, a 2D blitter on the T-Mobile G1, or hardware overlays on the Xoom.)

Each application renders into its windows (or surfaces) using primarily Skia. Skia is Android's 2D graphics library. You can also use OpenGL ES 1.x and 2.0 to render into a surface.

Android doesn't use DirectFB or X11 or any other existing Linux solution.

like image 151
Romain Guy Avatar answered Sep 26 '22 03:09

Romain Guy


There is a brief introduction presentation about Android Graphics: http://www.slideshare.net/jserv/design-and-concepts-of-android-graphics

like image 28
jserv Avatar answered Sep 24 '22 03:09

jserv