egl: android: directly use dri2_create_image_dma_buf()
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 1 May 2016 11:42:53 +0000 (12:42 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 May 2016 11:07:47 +0000 (12:07 +0100)
Make the function non static so that we can use it directly from the
android platform code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_android.c

index 65a3a62cf6744ff8437af90c95efb48efa00e6c8..6dcfd4930a904899fe2d5d3d336ce6b15fafe020 100644 (file)
@@ -1960,7 +1960,7 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
  *
  * Therefore we must never close or otherwise modify the file descriptors.
  */
-static _EGLImage *
+_EGLImage *
 dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
                          EGLClientBuffer buffer, const EGLint *attr_list)
 {
index ddb5f39c59cb7350db61ccb4dca8e15cafaf7536..925294b27d09b48007c096ad9ba8baf5f34fe40a 100644 (file)
@@ -361,6 +361,10 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
                      _EGLContext *ctx, EGLenum target,
                      EGLClientBuffer buffer, const EGLint *attr_list);
 
+_EGLImage *
+dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
+                         EGLClientBuffer buffer, const EGLint *attr_list);
+
 EGLBoolean
 dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);
 
index c837b358850a7418d737132b5f90ac1b9a191a02..9f0f133087eb936a024827ba24aa6210039b3403 100644 (file)
@@ -494,8 +494,7 @@ dri2_create_image_android_native_buffer(_EGLDriver *drv, _EGLDisplay *disp,
       if (fourcc == -1 || pitch == 0)
          return NULL;
 
-      return dri2_create_image_khr(drv, disp, ctx, EGL_LINUX_DMA_BUF_EXT,
-         NULL, attr_list);
+      return dri2_create_image_dma_buf(disp, ctx, NULL, attr_list);
    }
 
    name = get_native_buffer_name(buf);