egl/android: Add support for RGBX_8888 used in Android native buffers
authorSean V Kelley <sean.v.kelley@linux.intel.com>
Tue, 24 Apr 2012 14:49:09 +0000 (07:49 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Mon, 30 Apr 2012 18:22:46 +0000 (11:22 -0700)
Add new format __DRI_IMAGE_FORMAT_XBGR8888 to __DRI_IMAGE.
HAL_PIXEL_FORMAT_RGBX_8888 now maps to __DRI_IMAGE_FORMAT_XBGR8888.

Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
include/GL/internal/dri_interface.h
src/egl/drivers/dri2/platform_android.c

index da8366652fe2c505044015faae791fc90aeec59e..eafbe10f9b05120d69452bc16670936333588641 100644 (file)
@@ -906,6 +906,7 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FORMAT_XRGB8888     0x1002
 #define __DRI_IMAGE_FORMAT_ARGB8888     0x1003
 #define __DRI_IMAGE_FORMAT_ABGR8888     0x1004
+#define __DRI_IMAGE_FORMAT_XBGR8888     0x1005
 
 #define __DRI_IMAGE_USE_SHARE          0x0001
 #define __DRI_IMAGE_USE_SCANOUT                0x0002
index 1998941f82928953a4ce389e9cb10b59572df131..66142cdee5f895ccdf7229229198922ad8f7cc07 100644 (file)
@@ -311,6 +311,8 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp,
       format = __DRI_IMAGE_FORMAT_ABGR8888;
       break;
    case HAL_PIXEL_FORMAT_RGBX_8888:
+      format = __DRI_IMAGE_FORMAT_XBGR8888;
+      break;
    case HAL_PIXEL_FORMAT_RGB_888:
    case HAL_PIXEL_FORMAT_RGBA_5551:
    case HAL_PIXEL_FORMAT_RGBA_4444: