diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-11-23 11:24:36 +0059 |
---|---|---|
committer | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-11-23 11:24:36 +0059 |
commit | d44066f617faa4b32cf802458b851e6563af93c2 (patch) | |
tree | 183d4773bbba77d4039576b367d3564368e724b0 | |
parent | 8dc2df67514ba31dcf3eab3b5b84b65ec7f48e7b (diff) | |
download | libhardware-linaro_android_4.0.1.tar.gz |
gralloc: Fix inverted colors on BRGAlinaro_android_4.0.1
Don't assume any 32bpp mode is RGBX.
This is a forward-port of
commit f50b075a8b88eff482628e8ab62a04539117c7ea
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r-- | modules/gralloc/framebuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index 7fab3ddd..439e1f65 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -335,7 +335,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; |