summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-07-17 11:56:00 -0600
committerBrian Paul <brianp@vmware.com>2009-07-17 11:56:00 -0600
commit15fdbc8361d0b865aea5e2f374b471081ed4214a (patch)
treef0d15e4fed5f445e9754934e45388522640e906c /src/gallium/state_trackers/egl
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 <olvaffe@gmail.com>
Diffstat (limited to 'src/gallium/state_trackers/egl')
-rw-r--r--src/gallium/state_trackers/egl/egl_context.c4
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/egl/egl_context.c b/src/gallium/state_trackers/egl/egl_context.c
index 95dfcb9983..f03a29582a 100644
--- a/src/gallium/state_trackers/egl/egl_context.c
+++ b/src/gallium/state_trackers/egl/egl_context.c
@@ -148,9 +148,7 @@ drm_destroy_context(_EGLDriver *drv, EGLDisplay dpy, EGLContext context)
{
struct drm_context *c = lookup_drm_context(context);
_eglUnlinkContext(&c->base);
- if (c->base.IsBound) {
- c->base.DeletePending = EGL_TRUE;
- } else {
+ if (!c->base.IsBound) {
st_destroy_context(c->st);
c->pipe->destroy(c->pipe);
free(c);
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index 27b35052d1..86f2ea97e5 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -366,9 +366,7 @@ drm_destroy_surface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
struct drm_surface *surf = lookup_drm_surface(surface);
_eglUnlinkSurface(&surf->base);
- if (surf->base.IsBound) {
- surf->base.DeletePending = EGL_TRUE;
- } else {
+ if (!surf->base.IsBound) {
if (surf->screen)
drm_takedown_shown_screen(drv, surf->screen);
st_unreference_framebuffer(surf->stfb);