From ed3f1e04c7d2b5c17885919db5fde310d4bdf822 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 22 Jul 2020 01:19:03 +0200 Subject: [PATCH] egl: rename _eglMatchDriver() to _eglInitializeDisplay() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ... 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 Reviewed-by: Marcin Ślusarz Reviewed-by: Emil Velikov Part-of: --- 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 -- 2.30.2