From 092b1ca989ba3bdc3f4d421b83b3943af260b7db Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 26 Jan 2010 18:41:15 +0800 Subject: [PATCH] egl: Remove _eglOpenDriver and _eglCloseDriver. _eglCloseDriver is no-op and _eglOpenDriver does nothing but call _eglMatchDriver. Export _eglMatchDriver directly. --- src/egl/main/eglapi.c | 7 ++----- src/egl/main/egldriver.c | 23 +---------------------- src/egl/main/egldriver.h | 6 +----- 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 492a14180aa..90828bd3e90 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -104,15 +104,13 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) if (!drv) { _eglPreloadDrivers(); - drv = _eglOpenDriver(disp); + drv = _eglMatchDriver(disp); if (!drv) return _eglError(EGL_NOT_INITIALIZED, __FUNCTION__); /* Initialize the particular display now */ - if (!drv->API.Initialize(drv, disp, &major_int, &minor_int)) { - _eglCloseDriver(drv, disp); + if (!drv->API.Initialize(drv, disp, &major_int, &minor_int)) return _eglError(EGL_NOT_INITIALIZED, __FUNCTION__); - } disp->APImajor = major_int; disp->APIminor = minor_int; @@ -150,7 +148,6 @@ eglTerminate(EGLDisplay dpy) drv = disp->Driver; if (drv) { drv->API.Terminate(drv, disp); - _eglCloseDriver(drv, disp); disp->Driver = NULL; } diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index b820b966f9e..1dadbf783b6 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -269,7 +269,7 @@ _eglLoadDriver(const char *path, const char *args) * * The matching is done by finding the driver with the highest score. */ -static _EGLDriver * +_EGLDriver * _eglMatchDriver(_EGLDisplay *dpy) { _EGLDriver *best_drv = NULL; @@ -298,27 +298,6 @@ _eglMatchDriver(_EGLDisplay *dpy) } -/** - * Open a preloaded driver. - */ -_EGLDriver * -_eglOpenDriver(_EGLDisplay *dpy) -{ - _EGLDriver *drv = _eglMatchDriver(dpy); - return drv; -} - - -/** - * Close a preloaded driver. - */ -EGLBoolean -_eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy) -{ - return EGL_TRUE; -} - - /** * Preload a user driver. * diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index 4a1a7ece8c7..6ebb60a8f10 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -43,11 +43,7 @@ _eglMain(const char *args); extern _EGLDriver * -_eglOpenDriver(_EGLDisplay *dpy); - - -extern EGLBoolean -_eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy); +_eglMatchDriver(_EGLDisplay *dpy); extern EGLBoolean -- 2.30.2