egl: inline _eglGetDriverProc() into eglGetProcAddress()
authorEric Engestrom <eric@engestrom.ch>
Mon, 3 Aug 2020 23:38:02 +0000 (01:38 +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/main/eglapi.c
src/egl/main/egldriver.c
src/egl/main/egldriver.h

index 9c78e9c343e7e78fd3d7be667d9c751d171bc1c8..dc32b249f15e243e0c97d27c22dacc7f3823bc3b 100644 (file)
    _EGL_CHECK_OBJECT(disp, Sync, s, ret)
 
 
    _EGL_CHECK_OBJECT(disp, Sync, s, ret)
 
 
+extern const _EGLDriver _eglDriver;
+
+
 struct _egl_entrypoint {
    const char *name;
    _EGLProc function;
 struct _egl_entrypoint {
    const char *name;
    _EGLProc function;
@@ -2703,8 +2706,8 @@ eglGetProcAddress(const char *procname)
          ret = entrypoint->function;
    }
 
          ret = entrypoint->function;
    }
 
-   if (!ret)
-      ret = _eglGetDriverProc(procname);
+   if (!ret && _eglDriver.GetProcAddress)
+      ret = _eglDriver.GetProcAddress(procname);
 
    RETURN_EGL_SUCCESS(NULL, ret);
 }
 
    RETURN_EGL_SUCCESS(NULL, ret);
 }
index 987b4b333ea3b2abfa60c38105a49991bb757e61..981ca6a79d325f255aaf5cf9a2cdb5550f8a2930 100644 (file)
@@ -80,12 +80,3 @@ _eglInitializeDisplay(_EGLDisplay *disp)
    disp->Initialized = EGL_TRUE;
    return true;
 }
    disp->Initialized = EGL_TRUE;
    return true;
 }
-
-__eglMustCastToProperFunctionPointerType
-_eglGetDriverProc(const char *procname)
-{
-   if (_eglDriver.GetProcAddress)
-      return _eglDriver.GetProcAddress(procname);
-
-   return NULL;
-}
index 150e3556c045fb892b7364ea91439713061e9015..9cb6323a2e39427e1d1bc1a047f33817832bc579 100644 (file)
@@ -199,10 +199,6 @@ extern bool
 _eglInitializeDisplay(_EGLDisplay *disp);
 
 
 _eglInitializeDisplay(_EGLDisplay *disp);
 
 
-extern __eglMustCastToProperFunctionPointerType
-_eglGetDriverProc(const char *procname);
-
-
 #ifdef __cplusplus
 }
 #endif
 #ifdef __cplusplus
 }
 #endif