am 282ab1b6: Merge "gralloc: dont hardcode 32bpp as RGBX"

* commit '282ab1b6b1a92b8cb2650c111bfab02916f8715d':
  gralloc: dont hardcode 32bpp as RGBX
This commit is contained in:
Jesse Hall 2014-03-11 18:36:24 +00:00 committed by Android Git Automerger
commit f8e6a30ab9

View file

@ -330,7 +330,7 @@ int fb_device_open(hw_module_t const* module, const char* name,
if (status >= 0) {
int stride = m->finfo.line_length / (m->info.bits_per_pixel >> 3);
int format = (m->info.bits_per_pixel == 32)
? HAL_PIXEL_FORMAT_RGBX_8888
? (m->info.red.offset ? HAL_PIXEL_FORMAT_BGRA_8888 : HAL_PIXEL_FORMAT_RGBX_8888)
: HAL_PIXEL_FORMAT_RGB_565;
const_cast<uint32_t&>(dev->device.flags) = 0;
const_cast<uint32_t&>(dev->device.width) = m->info.xres;