diff options
author | Chia-I Wu <[email protected]> | 2009-07-17 11:56:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-07-17 11:56:00 -0600 |
commit | 15fdbc8361d0b865aea5e2f374b471081ed4214a (patch) | |
tree | f0d15e4fed5f445e9754934e45388522640e906c /src/gallium/winsys | |
parent | 3f7e0d5302ed0fadd794a41af6e476d2c408adc7 (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/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/egl_xlib/egl_xlib.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gallium/winsys/egl_xlib/egl_xlib.c b/src/gallium/winsys/egl_xlib/egl_xlib.c index 9914dff9643..e1ddcae97ba 100644 --- a/src/gallium/winsys/egl_xlib/egl_xlib.c +++ b/src/gallium/winsys/egl_xlib/egl_xlib.c @@ -382,10 +382,7 @@ xlib_eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx) struct xlib_egl_context *context = lookup_context(ctx); if (context) { _eglUnlinkContext(&context->Base); - if (context->Base.IsBound) { - context->Base.DeletePending = EGL_TRUE; - } - else { + if (!context->Base.IsBound) { /* API-dependent clean-up */ switch (context->Base.ClientAPI) { case EGL_OPENGL_ES_API: @@ -536,10 +533,7 @@ xlib_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface) struct xlib_egl_surface *surf = lookup_surface(surface); if (surf) { _eglUnlinkSurface(&surf->Base); - if (surf->Base.IsBound) { - surf->Base.DeletePending = EGL_TRUE; - } - else { + if (!surf->Base.IsBound) { XFreeGC(surf->Dpy, surf->Gc); st_unreference_framebuffer(surf->Framebuffer); free(surf); |