summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-08-07 20:55:37 -0700
committerMathias Agopian <mathias@google.com>2009-08-07 20:55:37 -0700
commit7d512e3dc37cc921a3e0e541a0476a4168310ecc (patch)
tree24b8efb7f72b48564b8b3565453743c3035ed893 /modules/gralloc
parente83629abb995cfdc49c0cd2ced2456c8eb41e73e (diff)
downloadhardware_libhardware-7d512e3dc37cc921a3e0e541a0476a4168310ecc.zip
hardware_libhardware-7d512e3dc37cc921a3e0e541a0476a4168310ecc.tar.gz
hardware_libhardware-7d512e3dc37cc921a3e0e541a0476a4168310ecc.tar.bz2
add support for RGBX_8888
Diffstat (limited to 'modules/gralloc')
-rw-r--r--modules/gralloc/gralloc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp
index 54aa64c..d936cd3 100644
--- a/modules/gralloc/gralloc.cpp
+++ b/modules/gralloc/gralloc.cpp
@@ -369,9 +369,13 @@ static int gralloc_alloc(alloc_device_t* dev,
int bpp = 0;
switch (format) {
case HAL_PIXEL_FORMAT_RGBA_8888:
+ case HAL_PIXEL_FORMAT_RGBX_8888:
case HAL_PIXEL_FORMAT_BGRA_8888:
bpp = 4;
break;
+ case HAL_PIXEL_FORMAT_RGB_888:
+ bpp = 3;
+ break;
case HAL_PIXEL_FORMAT_RGB_565:
case HAL_PIXEL_FORMAT_RGBA_5551:
case HAL_PIXEL_FORMAT_RGBA_4444: