egl/android: HAVE_DRM_GRALLOC path fixes (v2)

Fixes the following building errors:

external/mesa/src/egl/drivers/dri2/platform_android.c:1001:9: error: use of undeclared identifier 'dri2_img'
                                           dri2_img);
                                           ^
external/mesa/src/egl/drivers/dri2/platform_android.c:1059:17: error: incompatible pointer types assigning to '__DRIimage *' (aka 'struct __DRIimageRec *') from '_EGLImage *' (aka 'struct _egl_image *') [-Werror,-Wincompatible-pointer-types]
      dri_image = droid_create_image_from_name(disp, buf);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

(v2) Changelog:
- Pass NULL instead of dri_image as argument of createImageFromName()
- Delete the unused dri_image variable

Fixes: 5c8b67ed ("egl/android: Simplify droid_create_image_from_name() path")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6626>
This commit is contained in:
Mauro Rossi 2020-09-07 22:02:08 +02:00
parent 9d02d65f46
commit bb42deee36
1 changed files with 2 additions and 3 deletions

View File

@ -972,12 +972,11 @@ static int get_format(int format)
return -1;
}
static _EGLImage *
static __DRIimage *
droid_create_image_from_name(_EGLDisplay *disp,
struct ANativeWindowBuffer *buf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
__DRIimage *dri_image;
int name;
int format;
@ -998,7 +997,7 @@ droid_create_image_from_name(_EGLDisplay *disp,
format,
name,
buf->stride,
dri2_img);
NULL);
}
#endif /* HAVE_DRM_GRALLOC */