As far as I know, there're 2 graphics engines in Android: OpenGL ES and Skia. Both of them provide a set of drawing API and output graphics data to the underlying GraphicBuffer. My question is what's the data format for GraphicBuffer? Is it a standard?
-
Why don't you do your own research? We're not here to do it for you, nor teach you various things and how they work! – vallentin Jan 07 '14 at 09:12
-
@Vallentin It's unfair that you down voted this question. I don't think there's any problem with it. I did my research before asking it here. – Dagang Jan 07 '14 at 09:51
-
So you say it's unfair to down vote, because you didn't read the SO guidelines of how and what to ask? and because you didn't follow the guidelines at all! – vallentin Jan 07 '14 at 12:34
-
@Vallentin It's your right to down vote this question, but apparently this question follows all the guidelines! – Dagang Jan 07 '14 at 13:06
-
"Don't ask about... Questions you haven't tried to find an answer for (show your work!)" ... Where is "your work"? what did you try? – vallentin Jan 07 '14 at 13:46
-
Do you think I need to write the stupid "I searched SO and Google, but failed to find the answer"? If you think I can get the answer by searching SO or Google, please show me a duplicate question or something like. – Dagang Jan 07 '14 at 14:23
-
You clearly didn't get the point, quoting SO "Focus on questions about an actual problem you have faced. Include details about what you have tried and exactly what you are trying to do." ... Where is "the actual problem you have faced", "what have you tried", "what are you trying to do" ? – vallentin Jan 07 '14 at 15:05
1 Answers
OpenGL is not a graphics engine, it's a drawing API that talks directly with the GPU. It's not like OpenGL is a library with which a image in a certain format is drawn which is then loaded onto the graphics processor. OpenGL usually operates directly on the graphics processor.
Skia however really is a graphics engine. It can render either in software to a pixel buffer, or to a PDF. Or it can make OpenGL calls, which is what it usually does on Android.
A graphics buffer object is actually an abstract handle thing that represents the actual memory which holds the graphics data. But there is no "standard format"; each GPU may have its own preferrable layout. The important parameters are those of every RAW image format: Origin, row length, stride, number of channels, bits per channel, pixel data alignment.
However the most common format out there is BGRA with 8 bits per pixel, stride == row length, 4 bytes data alignment. But it's not important for you as a developer, what the OS uses behind the scenes.

- 159,371
- 13
- 185
- 298