- if (dpy->ContextList || dpy->SurfaceList)
- _eglLog(_EGL_DEBUG, "Display %u is destroyed with resources", key);
-
- _eglCleanupDisplay(dpy);
- free(dpy);
-
- key = _eglHashNextEntry(_eglDisplayHash, key);
- }
-
- _eglDeleteHashTable(_eglDisplayHash);
- _eglDisplayHash = NULL;
- _eglDeleteHashTable(_eglSurfaceHash);
- _eglSurfaceHash = NULL;
- }
- _eglUnlockMutex(&_eglDisplayInitMutex);
-}
-
-
-/* This can be avoided if hash table can be statically initialized */
-static INLINE void
-_eglInitDisplay(void)
-{
- if (!_eglDisplayHash) {
- _eglLockMutex(&_eglDisplayInitMutex);