summaryrefslogtreecommitdiff
path: root/src/egl/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/demo/demo.c12
-rw-r--r--src/egl/drivers/dri/egldri.c12
-rw-r--r--src/egl/drivers/glx/egl_glx.c6
-rw-r--r--src/egl/drivers/xdri/egl_xdri.c5
4 files changed, 6 insertions, 29 deletions
diff --git a/src/egl/drivers/demo/demo.c b/src/egl/drivers/demo/demo.c
index fa9efa5d35..f316974d83 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;
}
diff --git a/src/egl/drivers/dri/egldri.c b/src/egl/drivers/dri/egldri.c
index df45fbfbe2..3f9617a8f9 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;
}
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 661b313ae2..207b1ea779 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -739,12 +739,8 @@ GLX_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
return EGL_TRUE;
if (surf) {
_eglUnlinkSurface(surf);
- if (surf->IsBound) {
- surf->DeletePending = EGL_TRUE;
- }
- else {
+ if (!surf->IsBound)
free(surf);
- }
return EGL_TRUE;
}
diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c
index 34d69def6a..e040efdd43 100644
--- a/src/egl/drivers/xdri/egl_xdri.c
+++ b/src/egl/drivers/xdri/egl_xdri.c
@@ -958,10 +958,7 @@ xdri_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
struct xdri_egl_surface *xdri_surf = lookup_surface(surface);
if (xdri_surf) {
_eglUnlinkSurface(&xdri_surf->Base);
- if (xdri_surf->Base.IsBound) {
- xdri_surf->Base.DeletePending = EGL_TRUE;
- }
- else {
+ if (!xdri_surf->Base.IsBound) {
/*
st_unreference_framebuffer(surf->Framebuffer);
*/