egl: rename _eglMatchDriver() to _eglInitializeDisplay()
authorEric Engestrom <eric@engestrom.ch>
Tue, 21 Jul 2020 23:19:03 +0000 (01:19 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jul 2020 23:24:30 +0000 (23:24 +0000)
... and fix the comment to better reflect what this really does.

The whole "match a driver at runtime" thing has been gone for years.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marcin Ĺšlusarz <marcin.slusarz@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037>

src/egl/main/eglapi.c
src/egl/main/egldriver.c
src/egl/main/egldriver.h

index 21fb747d69287b27e2a899409f3bc178ff0c8914..b68772256fe9ce2c0d0974f2932cf0f3bf6a8def 100644 (file)
@@ -616,7 +616,7 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
       RETURN_EGL_ERROR(NULL, EGL_BAD_DISPLAY, EGL_FALSE);
 
    if (!disp->Initialized) {
-      if (!_eglMatchDriver(disp))
+      if (!_eglInitializeDisplay(disp))
          RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
 
       /* limit to APIs supported by core */
index f58b00e1a3c15649d2d814c22df374d9b4227a9a..7bbc9470b4143c97f7c4ab63f9ff723ccd98cc0b 100644 (file)
 extern _EGLDriver _eglDriver;
 
 /**
- * Match a display to a driver.  The matching is done by finding the first
- * driver that can initialize the display.
+ * Initialize the display using the driver's function.
+ * If the initialisation fails, try again using only software rendering.
  */
 bool
-_eglMatchDriver(_EGLDisplay *disp)
+_eglInitializeDisplay(_EGLDisplay *disp)
 {
    assert(!disp->Initialized);
 
index 0d0f50726b190c9ecb414ddc41e6e77b0951250d..d2c5f937a729ff9906bc91bd16969623fd31703e 100644 (file)
@@ -225,7 +225,7 @@ struct _egl_driver
 
 
 extern bool
-_eglMatchDriver(_EGLDisplay *disp);
+_eglInitializeDisplay(_EGLDisplay *disp);
 
 
 extern __eglMustCastToProperFunctionPointerType