summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2014-03-06 19:04:07 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-03-06 19:04:07 +0000
commit282ab1b6b1a92b8cb2650c111bfab02916f8715d (patch)
tree0a306fd2d586cf87f37dd9ae141ae6437e438aaa /modules/gralloc
parentb342abb6902a698963bb9d2108000da895845985 (diff)
parent5e3ac6bc7138e92fa04d7425a2a2535b9ae0e44a (diff)
downloadhardware_libhardware-282ab1b6b1a92b8cb2650c111bfab02916f8715d.zip
hardware_libhardware-282ab1b6b1a92b8cb2650c111bfab02916f8715d.tar.gz
hardware_libhardware-282ab1b6b1a92b8cb2650c111bfab02916f8715d.tar.bz2
Merge "gralloc: dont hardcode 32bpp as RGBX"
Diffstat (limited to 'modules/gralloc')
-rw-r--r--modules/gralloc/framebuffer.cpp2
1 files changed, 1 insertions, 1 deletions
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<uint32_t&>(dev->device.flags) = 0;
const_cast<uint32_t&>(dev->device.width) = m->info.xres;