summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/demo
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/demo
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/demo')
-rw-r--r--src/egl/drivers/demo/demo.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/egl/drivers/demo/demo.c b/src/egl/drivers/demo/demo.c
index fa9efa5d355..f316974d836 100644
--- a/src/egl/drivers/demo/demo.c
+++ b/src/egl/drivers/demo/demo.c
@@ -236,12 +236,8 @@ demoDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
{
DemoSurface *fs = LookupDemoSurface(surface);
_eglUnlinkSurface(&fs->Base);
- if (fs->Base.IsBound) {
- fs->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!fs->Base.IsBound)
free(fs);
- }
return EGL_TRUE;
}
@@ -251,12 +247,8 @@ demoDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext context)
{
DemoContext *fc = LookupDemoContext(context);
_eglUnlinkContext(&fc->Base);
- if (fc->Base.IsBound) {
- fc->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!fc->Base.IsBound)
free(fc);
- }
return EGL_TRUE;
}