Hi all

On 08/24/2010 12:23 PM, Simon Chan wrote:
> Hi, all,
> 
> I have encountered a format coversion issue when manage to add copybit
> module for some hw 2D core.
> 
> There are a lot of blit operations from COPYBIT_FORMAT_RGBA_8888 to
> COPYBIT_FORMAT_RGB_565 when do menu rendering.
> 

I have the exact same question. Is it sufficient to change here?

     switch (format) { // TODO: take h/w into account
     case PIXEL_FORMAT_TRANSPARENT:
     case PIXEL_FORMAT_TRANSLUCENT:
-        format = PIXEL_FORMAT_RGBA_8888;
+        format = PIXEL_FORMAT_BGRA_8888;
         break;
     case PIXEL_FORMAT_OPAQUE:
         format = PIXEL_FORMAT_RGB_565;

Michael

> It looks the layout of android COPYBIT_FORMAT_RGBA_8888 format is as figure 1.
> 
> 31     ...      0
> ---------------------
> | A | B | G | R |  (1)
> ---------------------
> 
> but unfortunately, for 8:8:8:8 image, the 2d hw in question only
> supports layout as figure 2.
> 
> 31     ...      0
> ---------------------
> | A | R | G | B |  (2)
> ---------------------
> 
> So my question is there any thing I can do to work aound it, and will
> not hurt performance significantly?
> eg. by some way I can force ARGB src image data.
> 
> Suggestion is welcome and much appreciated. Thanks a lot.
> 
> BR.
> Simon Chan
> 

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

Reply via email to