summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-07-17 11:56:00 -0600
committerBrian Paul <[email protected]>2009-07-17 11:56:00 -0600
commit15fdbc8361d0b865aea5e2f374b471081ed4214a (patch)
treef0d15e4fed5f445e9754934e45388522640e906c /src/egl/drivers/dri
parent3f7e0d5302ed0fadd794a41af6e476d2c408adc7 (diff)
egl: Remove redundant DeletePending flag.
A context or surface that is neither linked to a display nor current to a thread should be destroyed. Therefore, an unlinked context or surface implies a pending delete automatically. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri')
-rw-r--r--src/egl/drivers/dri/egldri.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/egl/drivers/dri/egldri.c b/src/egl/drivers/dri/egldri.c
index df45fbfbe2f..3f9617a8f98 100644
--- a/src/egl/drivers/dri/egldri.c
+++ b/src/egl/drivers/dri/egldri.c
@@ -296,12 +296,8 @@ _eglDRIDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
fs->drawable.destroyDrawable(disp, fs->drawable.private);
- if (fs->Base.IsBound) {
- fs->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!fs->Base.IsBound)
free(fs);
- }
return EGL_TRUE;
}
@@ -316,12 +312,8 @@ _eglDRIDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext context)
fc->driContext.destroyContext(disp, 0, fc->driContext.private);
- if (fc->Base.IsBound) {
- fc->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!fc->Base.IsBound)
free(fc);
- }
return EGL_TRUE;
}