egl: drop unused _EGLDriver from Terminate()
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:17 +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/haiku/egl_haiku.cpp
src/egl/main/eglapi.c
src/egl/main/egldriver.h

index 82804934d351fa70df62fb714f1880d7365db1bf..f8c3a6967d6fe3aa7c5fd4f398f9e882050357c9 100644 (file)
@@ -1311,7 +1311,7 @@ dri2_egl_surface_free_local_buffers(struct dri2_egl_surface *dri2_surf)
  * called many times (without a eglInitialize in between).
  */
 static EGLBoolean
-dri2_terminate(const _EGLDriver *drv, _EGLDisplay *disp)
+dri2_terminate(_EGLDisplay *disp)
 {
    /* Release all non-current Context/Surfaces. */
    _eglReleaseDisplayResources(disp);
index ac598827c5f01c21c9b82004b874d4773388c652..58872433ee6aa05be86cd1fa38912dcbac4ae87f 100644 (file)
@@ -229,7 +229,7 @@ init_haiku(_EGLDisplay *disp)
 
 extern "C"
 EGLBoolean
-haiku_terminate(const _EGLDriver* drv,_EGLDisplay *disp)
+haiku_terminate(_EGLDisplay *disp)
 {
        return EGL_TRUE;
 }
index d135c941c768069064566caf09fd4f7fd7d6747a..b5c5e79c751b85a379e8b2171e2cd8ec1a1b5f92 100644 (file)
@@ -672,9 +672,7 @@ eglTerminate(EGLDisplay dpy)
       RETURN_EGL_ERROR(NULL, EGL_BAD_DISPLAY, EGL_FALSE);
 
    if (disp->Initialized) {
-      const _EGLDriver *drv = disp->Driver;
-
-      drv->Terminate(drv, disp);
+      disp->Driver->Terminate(disp);
       /* do not reset disp->Driver */
       disp->ClientAPIsString[0] = 0;
       disp->Initialized = EGL_FALSE;
index 49d26b10164d4f73b5787fff81afd8fb4283b8d8..21dd422c9553cb57ae1b3b9e9f2efa141698905d 100644 (file)
@@ -86,7 +86,7 @@ struct _egl_driver
 {
    /* driver funcs */
    EGLBoolean (*Initialize)(_EGLDisplay *disp);
-   EGLBoolean (*Terminate)(const _EGLDriver *, _EGLDisplay *disp);
+   EGLBoolean (*Terminate)(_EGLDisplay *disp);
    const char *(*QueryDriverName)(_EGLDisplay *disp);
    char *(*QueryDriverConfig)(_EGLDisplay *disp);