summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-08-13 13:39:51 +0800
committerBrian Paul <brianp@vmware.com>2009-08-18 08:49:22 -0600
commitccc2b0bc65b02d4582d52d133290c8cb046bce8f (patch)
tree8e5ca6fa9354e0cdc7ed6112651c8afefc386f92 /src
parent5a2c9372a0d9fa1efd924f9386a4e3df47c17d0e (diff)
downloadexternal_mesa3d-ccc2b0bc65b02d4582d52d133290c8cb046bce8f.zip
external_mesa3d-ccc2b0bc65b02d4582d52d133290c8cb046bce8f.tar.gz
external_mesa3d-ccc2b0bc65b02d4582d52d133290c8cb046bce8f.tar.bz2
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>
Diffstat (limited to 'src')
-rw-r--r--src/egl/main/eglapi.c2
-rw-r--r--src/egl/main/egldisplay.c11
-rw-r--r--src/egl/main/egldriver.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index a23b571..29617b7 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -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;
}
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index ba7e634..0693f25 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -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 */
}
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 0e6b294..a252a9a 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -359,8 +359,6 @@ _eglOpenDriver(_EGLDisplay *dpy)
EGLBoolean
_eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy)
{
- _eglReleaseDisplayResources(drv, dpy);
- drv->API.Terminate(drv, dpy);
return EGL_TRUE;
}