From 1a17f1db555172597a15c3c88396f44b4aded5fc 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 MakeCurrent() 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 | 6 ++---- src/egl/main/egldriver.h | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index fbf92cfdd23..128c4127fec 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1754,7 +1754,7 @@ dri2_create_drawable(struct dri2_egl_display *dri2_dpy, * Called via eglMakeCurrent(), drv->MakeCurrent(). */ static EGLBoolean -dri2_make_current(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf, +dri2_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, _EGLSurface *rsurf, _EGLContext *ctx) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 2b2c7d90c4f..3bb1a798466 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -278,7 +278,7 @@ haiku_destroy_context(_EGLDisplay *disp, _EGLContext* ctx) extern "C" EGLBoolean -haiku_make_current(const _EGLDriver* drv, _EGLDisplay *disp, _EGLSurface *dsurf, +haiku_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, _EGLSurface *rsurf, _EGLContext *ctx) { CALLED(); diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 7177f9e7d2f..77099a74438 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -879,7 +879,7 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, if (read_surf && read_surf->Lost) RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_FALSE); - ret = drv->MakeCurrent(drv, disp, draw_surf, read_surf, context); + ret = drv->MakeCurrent(disp, draw_surf, read_surf, context); RETURN_EGL_EVAL(disp, ret); } @@ -1705,11 +1705,9 @@ eglReleaseThread(void) if (ctx) { _EGLDisplay *disp = ctx->Resource.Display; - const _EGLDriver *drv; mtx_lock(&disp->Mutex); - drv = disp->Driver; - (void) drv->MakeCurrent(drv, disp, NULL, NULL, NULL); + (void) disp->Driver->MakeCurrent(disp, NULL, NULL, NULL); mtx_unlock(&disp->Mutex); } } diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index 7e8927970c8..daf41e77c0a 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -97,7 +97,7 @@ struct _egl_driver /* this is the only function (other than Initialize) that may be called * with an uninitialized display */ - EGLBoolean (*MakeCurrent)(const _EGLDriver *drv, _EGLDisplay *disp, + EGLBoolean (*MakeCurrent)(_EGLDisplay *disp, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx); -- 2.30.2