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 <[email protected]>
wrote:
> No.
>
> I found some more info on this 
> thread:https://groups.google.com/group/android-porting/browse_thread/thread/...
>
> 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?
>
> On Apr 3, 5:48 am, Cat <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hello, I am having exactly the same problem.
> > Did you find any solution?
>
> > On Mar 17, 10:25 pm, extrapedestrian <[email protected]>
> > wrote:
>
> > > 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 <[email protected]>
> > > wrote:
>
> > > > 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?

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to