diff options
author | Kristian Høgsberg <[email protected]> | 2010-07-22 23:45:18 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-07-23 22:05:52 -0400 |
commit | c796bb0cc3fde409545bff320540ddf5c029e513 (patch) | |
tree | dded830c438042a6d7a97a260d33b27f49737271 /src/glx/dri2_glx.c | |
parent | 80b331c7f6c3724f2044325e0d7d7c79ae5a4510 (diff) |
glx: Move context destroy to context vtable
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r-- | src/glx/dri2_glx.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index ae5bf535afb..02c0f9f24ee 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -114,11 +114,18 @@ struct dri2_drawable static const struct glx_context_vtable dri2_context_vtable; static void -dri2DestroyContext(__GLXcontext *context) +dri2_destroy_context(__GLXcontext *context) { struct dri2_context *pcp = (struct dri2_context *) context; struct dri2_screen *psc = (struct dri2_screen *) context->psc; + glx_send_destroy_context(psc->base.dpy, context->xid); + + if (context->extensions) + XFree((char *) context->extensions); + + GarbageCollectDRIDrawables(context->psc); + (*psc->core->destroyContext) (pcp->driContext); Xfree(pcp); @@ -182,7 +189,6 @@ dri2CreateContext(__GLXscreenConfigs *base, pcp->base.vtable = &dri2_context_vtable; pcp->base.driContext = &pcp->dri_vtable; - pcp->dri_vtable.destroyContext = dri2DestroyContext; pcp->dri_vtable.bindContext = dri2BindContext; pcp->dri_vtable.unbindContext = dri2UnbindContext; @@ -675,6 +681,7 @@ dri2_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer) } static const struct glx_context_vtable dri2_context_vtable = { + dri2_destroy_context, dri2_wait_gl, dri2_wait_x, DRI_glXUseXFont, |