Android4.0.4 framebuffer 支持32位色彩深度:
1、在/hardware/libhardware/modules/gralloc/framebuffer.cpp中的
fb_device_open(hw_module_t const* module, const char* name,hw_device_t** device)中改動
// int format = (m->info.bits_per_pixel == 32)
// ? HAL_PIXEL_FORMAT_RGBX_8888
// : HAL_PIXEL_FORMAT_RGB_565;
int format = (m->info.bits_per_pixel == 32)
? HAL_PIXEL_FORMAT_BGRA_8888
: HAL_PIXEL_FORMAT_RGB_565;
當framebuffer是32位色深時選擇HAL_PIXEL_FORMAT_BGRA_8888格式;
更多Android相關信息見Android 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=11