egl: Untangle some spaghetti around _eglLookupDisplay

Only eglapi needs any of this.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18713>
This commit is contained in:
Adam Jackson
2022-09-20 13:51:00 -04:00
committed by Marge Bot
parent 1f94f28e8c
commit b2ee2de1fb
3 changed files with 21 additions and 38 deletions

View File

@@ -254,28 +254,10 @@ extern void
_eglCleanupDisplay(_EGLDisplay *disp);
extern EGLBoolean
_eglCheckDisplayHandle(EGLDisplay dpy);
extern EGLBoolean
_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *disp);
/**
* Lookup a handle to find the linked display.
* Return NULL if the handle has no corresponding linked display.
*/
static inline _EGLDisplay *
_eglLookupDisplay(EGLDisplay dpy)
{
_EGLDisplay *disp = (_EGLDisplay *) dpy;
if (!_eglCheckDisplayHandle(dpy))
disp = NULL;
return disp;
}
/**
* Return the handle of a linked display, or EGL_NO_DISPLAY.
*/