[Mesa-dev] [PATCHv2 4/4] egl_dri2: add support for RGBA_8888 android native buffer

Chia-I Wu olvaffe at gmail.com
Sun Sep 4 00:02:02 PDT 2011


From: Chia-I Wu <olv at lunarg.com>

HAL_PIXEL_FORMAT_RGBA_8888 maps to __DRI_IMAGE_FORMAT_ABGR8888.
---
 src/egl/drivers/dri2/platform_android.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index a0e4c65..3abd536 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -308,6 +308,8 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp,
       format = __DRI_IMAGE_FORMAT_RGB565;
       break;
    case HAL_PIXEL_FORMAT_RGBA_8888:
+      format = __DRI_IMAGE_FORMAT_ABGR8888;
+      break;
    case HAL_PIXEL_FORMAT_RGBX_8888:
    case HAL_PIXEL_FORMAT_RGB_888:
    case HAL_PIXEL_FORMAT_RGBA_5551:
-- 
1.7.5.4



More information about the mesa-dev mailing list