egl: drop unused _EGLDriver from {Create,Destroy}ImageKHR()
authorEric Engestrom <eric@engestrom.ch>
Sun, 22 Apr 2018 14:48:15 +0000 (16:48 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sun, 16 Aug 2020 13:49:18 +0000 (13:49 +0000)
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6241>

src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_android.c
src/egl/drivers/dri2/platform_drm.c
src/egl/drivers/dri2/platform_x11.c
src/egl/drivers/dri2/platform_x11_dri3.c
src/egl/main/eglapi.c
src/egl/main/egldisplay.c
src/egl/main/egldriver.h

index 400c622..2bea859 100644 (file)
@@ -2193,12 +2193,11 @@ dri2_release_tex_image(_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
 }
 
 static _EGLImage*
-dri2_create_image(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx,
-                  EGLenum target, EGLClientBuffer buffer,
-                  const EGLint *attr_list)
+dri2_create_image(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
+                  EGLClientBuffer buffer, const EGLint *attr_list)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
-   return dri2_dpy->vtbl->create_image(drv, disp, ctx, target, buffer,
+   return dri2_dpy->vtbl->create_image(disp, ctx, target, buffer,
                                        attr_list);
 }
 
@@ -3114,12 +3113,9 @@ dri2_export_dma_buf_image_mesa(const _EGLDriver *drv, _EGLDisplay *disp, _EGLIma
 #endif
 
 _EGLImage *
-dri2_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
-                      _EGLContext *ctx, EGLenum target,
+dri2_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
                       EGLClientBuffer buffer, const EGLint *attr_list)
 {
-   (void) drv;
-
    switch (target) {
    case EGL_GL_TEXTURE_2D_KHR:
    case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR:
@@ -3149,13 +3145,11 @@ dri2_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
 }
 
 static EGLBoolean
-dri2_destroy_image_khr(const _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *image)
+dri2_destroy_image_khr(_EGLDisplay *disp, _EGLImage *image)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
    struct dri2_egl_image *dri2_img = dri2_egl_image(image);
 
-   (void) drv;
-
    dri2_dpy->image->destroyImage(dri2_img->dri_image);
    free(dri2_img);
 
index 063e7ee..daef432 100644 (file)
@@ -113,9 +113,8 @@ struct dri2_egl_display_vtbl {
                                EGLint interval);
 
    /* mandatory */
-   _EGLImage* (*create_image)(const _EGLDriver *drv, _EGLDisplay *disp,
-                              _EGLContext *ctx, EGLenum target,
-                              EGLClientBuffer buffer,
+   _EGLImage* (*create_image)(_EGLDisplay *disp, _EGLContext *ctx,
+                              EGLenum target, EGLClientBuffer buffer,
                               const EGLint *attr_list);
 
    /* mandatory */
@@ -441,8 +440,7 @@ EGLBoolean
 dri2_add_pbuffer_configs_for_visuals(_EGLDisplay *disp);
 
 _EGLImage *
-dri2_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
-                      _EGLContext *ctx, EGLenum target,
+dri2_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
                       EGLClientBuffer buffer, const EGLint *attr_list);
 
 _EGLImage *
index 1d68b13..97f9741 100644 (file)
@@ -1066,16 +1066,15 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp,
 }
 
 static _EGLImage *
-droid_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
-                      _EGLContext *ctx, EGLenum target,
-                      EGLClientBuffer buffer, const EGLint *attr_list)
+droid_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
+                       EGLClientBuffer buffer, const EGLint *attr_list)
 {
    switch (target) {
    case EGL_NATIVE_BUFFER_ANDROID:
       return dri2_create_image_android_native_buffer(disp, ctx,
             (struct ANativeWindowBuffer *) buffer);
    default:
-      return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+      return dri2_create_image_khr(disp, ctx, target, buffer, attr_list);
    }
 }
 
index 2354148..d0b6929 100644 (file)
@@ -486,17 +486,14 @@ dri2_drm_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
 }
 
 static _EGLImage *
-dri2_drm_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
-                          _EGLContext *ctx, EGLenum target,
+dri2_drm_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
                           EGLClientBuffer buffer, const EGLint *attr_list)
 {
-   (void) drv;
-
    switch (target) {
    case EGL_NATIVE_PIXMAP_KHR:
       return dri2_drm_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
    default:
-      return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+      return dri2_create_image_khr(disp, ctx, target, buffer, attr_list);
    }
 }
 
index c463386..108d866 100644 (file)
@@ -1120,17 +1120,14 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
 }
 
 static _EGLImage *
-dri2_x11_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
-                         _EGLContext *ctx, EGLenum target,
-                         EGLClientBuffer buffer, const EGLint *attr_list)
+dri2_x11_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
+                          EGLClientBuffer buffer, const EGLint *attr_list)
 {
-   (void) drv;
-
    switch (target) {
    case EGL_NATIVE_PIXMAP_KHR:
       return dri2_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
    default:
-      return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+      return dri2_create_image_khr(disp, ctx, target, buffer, attr_list);
    }
 }
 
index 7a90d73..0a003c3 100644 (file)
@@ -366,8 +366,7 @@ dri3_create_image_khr_pixmap_from_buffers(_EGLDisplay *disp, _EGLContext *ctx,
 #endif
 
 static _EGLImage *
-dri3_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
-                      _EGLContext *ctx, EGLenum target,
+dri3_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target,
                       EGLClientBuffer buffer, const EGLint *attr_list)
 {
 #ifdef HAVE_DRI3_MODIFIERS
@@ -383,7 +382,7 @@ dri3_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
 #endif
       return dri3_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
    default:
-      return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+      return dri2_create_image_khr(disp, ctx, target, buffer, attr_list);
    }
 }
 
index decec9a..fe8eeca 100644 (file)
@@ -1734,8 +1734,7 @@ _eglCreateImageCommon(_EGLDisplay *disp, EGLContext ctx, EGLenum target,
    if (ctx != EGL_NO_CONTEXT && target == EGL_LINUX_DMA_BUF_EXT)
       RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
 
-   img = drv->CreateImageKHR(drv, disp, context, target,
-                                 buffer, attr_list);
+   img = drv->CreateImageKHR(disp, context, target, buffer, attr_list);
    ret = (img) ? _eglLinkImage(img) : EGL_NO_IMAGE_KHR;
 
    RETURN_EGL_EVAL(disp, ret);
@@ -1784,7 +1783,7 @@ _eglDestroyImageCommon(_EGLDisplay *disp, _EGLImage *img)
       RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
 
    _eglUnlinkImage(img);
-   ret = drv->DestroyImageKHR(drv, disp, img);
+   ret = drv->DestroyImageKHR(disp, img);
 
    RETURN_EGL_EVAL(disp, ret);
 }
index 894cd54..b9b5c78 100644 (file)
@@ -324,7 +324,7 @@ _eglReleaseDisplayResources(_EGLDisplay *display)
       list = list->Next;
 
       _eglUnlinkImage(image);
-      drv->DestroyImageKHR(drv, display, image);
+      drv->DestroyImageKHR(display, image);
    }
    assert(!display->ResourceLists[_EGL_RESOURCE_IMAGE]);
 
index 3f66490..c324b3e 100644 (file)
@@ -130,12 +130,10 @@ struct _egl_driver
    /* this function may be called from multiple threads at the same time */
    _EGLProc (*GetProcAddress)(const char *procname);
 
-   _EGLImage *(*CreateImageKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
-                                _EGLContext *ctx, EGLenum target,
-                                EGLClientBuffer buffer,
+   _EGLImage *(*CreateImageKHR)(_EGLDisplay *disp, _EGLContext *ctx,
+                                EGLenum target, EGLClientBuffer buffer,
                                 const EGLint *attr_list);
-   EGLBoolean (*DestroyImageKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
-                                 _EGLImage *image);
+   EGLBoolean (*DestroyImageKHR)(_EGLDisplay *disp, _EGLImage *image);
 
    _EGLSync *(*CreateSyncKHR)(const _EGLDriver *drv, _EGLDisplay *disp, EGLenum type,
                               const EGLAttrib *attrib_list);