when switch to 32 bit graphics icons go black

22 views
Skip to first unread message

extrapedestrian

unread,
Mar 15, 2011, 9:41:10 AM3/15/11
to android-porting
Hi Im working on MIPS Froyo port, and we had 16bit Framebuffer
working, and now I switched to 32bit RGBA format, and all Icons and
some GUI elements are completely black.

Homescreen background, browser content, jpg images are looking good.

Any ideas?

extrapedestrian

unread,
Mar 17, 2011, 9:25:11 AM3/17/11
to android-porting
Here is more info:

We are running MIPS Froyo on Big Endian platform.
Our Framebuffer has 32 bit format: ARGB, while Froyo only has RGBA to
offer.
So when I use "HAL_PIXEL_FORMAT_RGBA_8888" in gralloc allocation,
colors get strange.
I tried tweaking pixelflinger and codeflinger to rotate pixel buffer,
I added fix to load_store.cpp file and got some better results. My
background and browser content look fine now.
But Icons and some GUI elements are all black.

Any help on this issue is appreciated.


On Mar 15, 2:41 pm, extrapedestrian <extra.pedestr...@gmail.com>
wrote:

Cat

unread,
Apr 2, 2011, 11:48:35 PM4/2/11
to android-porting
Hello, I am having exactly the same problem.
Did you find any solution?

On Mar 17, 10:25 pm, extrapedestrian <extra.pedestr...@gmail.com>
wrote:

extrapedestrian

unread,
Apr 14, 2011, 3:37:35 AM4/14/11
to android-porting
No.

I found some more info on this thread:
https://groups.google.com/group/android-porting/browse_thread/thread/a8843a1c6bab61df

I tried adding new pixel format and defining it in format.cpp, but
that didn't go well.
In this thread they say that fix to load_store.cpp will break OpenGLES
or SKIA, and thats exactly how it look to me.

Im not sure what is causing this problem, ARGB_8888 format is not that
strange, it should be suported, maybe it is BigEndian issue somewhere,
or some of mips optimizations have bug.

Any hints here are still welcome.

Maybe someone from google can tell us if pixel formats are better
supported in next releases?

extrapedestrian

unread,
May 5, 2011, 2:58:20 AM5/5/11
to android-porting
I found the reason why all icons go black when new pixel format is
chosen.
If you define new 32bit pixel format in libpixelflinger/format.cpp,
and use it in framebuffer, you have to find all places hardcoded with
PIXEL_FORMAT_RGBA_8888 and format switch cases, and add your format
there.

One place in particular gave me trouble, SurfaceFlinger.cpp:
createNormalSurfaceLocked returns hardcoded RGBA. When replaced by new
format there all icons go black because of skia format conversion in
com_google_android_gles_jni_EGLImpl.cpp and android_view_Surface.cpp
so watch out for those spots.

Although this is fixed, I still have wrong colors with new format, and
Im not sure if problem is big endian, or new color format or both.


On Apr 14, 9:37 am, extrapedestrian <extra.pedestr...@gmail.com>
wrote:
> No.
>
> I found some more info on this thread:https://groups.google.com/group/android-porting/browse_thread/thread/...
Reply all
Reply to author
Forward
0 new messages