- _EGLDisplay *dpyList, *dpy;
-
- /* atexit function is called with global mutex locked */
- dpyList = _eglGlobal.DisplayList;
- while (dpyList) {
- /* pop list head */
- dpy = dpyList;
- dpyList = dpyList->Next;
-
- if (dpy->ContextList || dpy->SurfaceList)
- _eglLog(_EGL_DEBUG, "Display %p is destroyed with resources", dpy);
-
- free(dpy);
- }
- _eglGlobal.DisplayList = NULL;
-}
-
-
-/**
- * If the first character is '!' we interpret it as specific driver name
- * (i.e. "!r200" or "!i830"). Whatever follows ':' is interpreted as
- * arguments.
- *
- * The caller may free() the returned driver name.
- */
-char *
-_eglSplitDisplayString(const char *dpyString, const char **args)
-{
- char *drv, *p;
+ /* map --with-egl-platforms names to platform types */
+ static const struct {
+ _EGLPlatformType platform;
+ const char *name;
+ } egl_platforms[_EGL_NUM_PLATFORMS] = {
+ { _EGL_PLATFORM_WINDOWS, "gdi" },
+ { _EGL_PLATFORM_X11, "x11" },
+ { _EGL_PLATFORM_DRM, "drm" },
+ { _EGL_PLATFORM_FBDEV, "fbdev" }
+ };
+ _EGLPlatformType plat = _EGL_INVALID_PLATFORM;
+ const char *plat_name;
+ EGLint i;