egl: _eglCloseDriver should be no-op.

Move drv->API.Terminate call to eglTerminate.  Remove
_eglReleaseDisplayResource as drivers are doing it.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
Chia-I Wu 2009-08-13 13:39:51 +08:00 committed by Brian Paul
parent 5a2c9372a0
commit ccc2b0bc65
3 changed files with 7 additions and 8 deletions

View File

@ -122,7 +122,7 @@ eglTerminate(EGLDisplay dpy)
drv = disp->Driver;
if (drv) {
/* TODO drv->API.Terminate should be called here */
drv->API.Terminate(drv, disp);
_eglCloseDriver(drv, disp);
disp->Driver = NULL;
}

View File

@ -40,7 +40,6 @@ _eglFiniDisplay(void)
if (dpy->ContextList || dpy->SurfaceList)
_eglLog(_EGL_DEBUG, "Display %u is destroyed with resources", key);
_eglCleanupDisplay(dpy);
free(dpy);
key = _eglHashNextEntry(_eglDisplayHash, key);
@ -237,11 +236,13 @@ _eglCleanupDisplay(_EGLDisplay *disp)
{
EGLint i;
for (i = 0; i < disp->NumConfigs; i++) {
free(disp->Configs[i]);
if (disp->Configs) {
for (i = 0; i < disp->NumConfigs; i++)
free(disp->Configs[i]);
free(disp->Configs);
disp->Configs = NULL;
disp->NumConfigs = 0;
}
free(disp->Configs);
disp->Configs = NULL;
/* XXX incomplete */
}

View File

@ -359,8 +359,6 @@ _eglOpenDriver(_EGLDisplay *dpy)
EGLBoolean
_eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy)
{
_eglReleaseDisplayResources(drv, dpy);
drv->API.Terminate(drv, dpy);
return EGL_TRUE;
}