From 435ad514163d58596059256ae8f0bc518b99b4a1 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sun, 22 Apr 2018 16:48:15 +0200 Subject: [PATCH] egl: drop unused _EGLDriver from Terminate() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Reviewed-by: Marek Olšák Part-of: --- src/egl/drivers/dri2/egl_dri2.c | 2 +- src/egl/drivers/haiku/egl_haiku.cpp | 2 +- src/egl/main/eglapi.c | 4 +--- src/egl/main/egldriver.h | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 82804934d35..f8c3a6967d6 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -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); diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index ac598827c5f..58872433ee6 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -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; } diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index d135c941c76..b5c5e79c751 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -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; diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index 49d26b10164..21dd422c955 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -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); -- 2.30.2