From 5e3ac6bc7138e92fa04d7425a2a2535b9ae0e44a Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Fri, 21 Feb 2014 01:38:44 +0530 Subject: gralloc: dont hardcode 32bpp as RGBX Not every 32bpp is in RGBX format. Change-Id: Ic3c6a0cbf475bff2fe2fc4b023c6bc58e4fc295e Signed-off-by: Amit Pundir --- modules/gralloc/framebuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index 326f2ae..9d8513a 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -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(dev->device.flags) = 0; const_cast(dev->device.width) = m->info.xres; -- cgit v1.1