diff options
-rw-r--r-- | include/hardware/copybit.h | 2 | ||||
-rw-r--r-- | include/hardware/hardware.h | 2 | ||||
-rw-r--r-- | modules/gralloc/gralloc.cpp | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/hardware/copybit.h b/include/hardware/copybit.h index 833aa32..556ccfa 100644 --- a/include/hardware/copybit.h +++ b/include/hardware/copybit.h @@ -40,6 +40,8 @@ __BEGIN_DECLS */ enum { COPYBIT_FORMAT_RGBA_8888 = HAL_PIXEL_FORMAT_RGBA_8888, + COPYBIT_FORMAT_RGBX_8888 = HAL_PIXEL_FORMAT_RGBX_8888, + COPYBIT_FORMAT_RGB_888 = HAL_PIXEL_FORMAT_RGB_888, COPYBIT_FORMAT_RGB_565 = HAL_PIXEL_FORMAT_RGB_565, COPYBIT_FORMAT_BGRA_8888 = HAL_PIXEL_FORMAT_BGRA_8888, COPYBIT_FORMAT_RGBA_5551 = HAL_PIXEL_FORMAT_RGBA_5551, diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h index 27a4156..4d34852 100644 --- a/include/hardware/hardware.h +++ b/include/hardware/hardware.h @@ -121,6 +121,8 @@ int hw_get_module(const char *id, const struct hw_module_t **module); enum { HAL_PIXEL_FORMAT_RGBA_8888 = 1, + HAL_PIXEL_FORMAT_RGBX_8888 = 2, + HAL_PIXEL_FORMAT_RGB_888 = 3, HAL_PIXEL_FORMAT_RGB_565 = 4, HAL_PIXEL_FORMAT_BGRA_8888 = 5, HAL_PIXEL_FORMAT_RGBA_5551 = 6, 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: |