Mesa (master): egl: rename _eglMatchDriver() to _eglInitializeDisplay()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 23:44:57 UTC 2020


Module: Mesa
Branch: master
Commit: ed3f1e04c7d2b5c17885919db5fde310d4bdf822
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed3f1e04c7d2b5c17885919db5fde310d4bdf822

Author: Eric Engestrom <eric at engestrom.ch>
Date:   Wed Jul 22 01:19:03 2020 +0200

egl: rename _eglMatchDriver() to _eglInitializeDisplay()

... 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 at engestrom.ch>
Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037>

---

 src/egl/main/eglapi.c    | 2 +-
 src/egl/main/egldriver.c | 6 +++---
 src/egl/main/egldriver.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 21fb747d692..b68772256fe 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -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 */
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index f58b00e1a3c..7bbc9470b41 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -49,11 +49,11 @@
 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);
 
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index 0d0f50726b1..d2c5f937a72 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -225,7 +225,7 @@ struct _egl_driver
 
 
 extern bool
-_eglMatchDriver(_EGLDisplay *disp);
+_eglInitializeDisplay(_EGLDisplay *disp);
 
 
 extern __eglMustCastToProperFunctionPointerType



More information about the mesa-commit mailing list