summaryrefslogtreecommitdiff
path: root/xc
diff options
context:
space:
mode:
authorkem <kem>1999-12-13 20:23:03 +0000
committerkem <kem>1999-12-13 20:23:03 +0000
commit51b5c38be0e05844ec0f61cb4617bdb7195ba0a5 (patch)
treecac58ea055fe74515be82c8866970e56c344da2a /xc
parent1e72115dafec642a1252ecf5ff00d567fe2f7cff (diff)
When a drawable is unbound from one direct rendering context and then bound
to another, we do not want to destroy the drawable data structure each time only to recreate it immediatly afterwards when binding to the next context. This also causes conflicts with caching of the drawable stamp. When GLX 1.3 is integrated, the create and destroy drawable functions will have user level counterparts and the memory will be able to be recovered. Until that time, we will not destroy the drawables when their refcounts go to zero.
Diffstat (limited to 'xc')
-rw-r--r--xc/lib/GL/dri/dri_mesa.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xc/lib/GL/dri/dri_mesa.c b/xc/lib/GL/dri/dri_mesa.c
index ff1ddd4b6..f5fd3fa61 100644
--- a/xc/lib/GL/dri/dri_mesa.c
+++ b/xc/lib/GL/dri/dri_mesa.c
@@ -153,10 +153,25 @@ static Bool driMesaUnbindContext(Display *dpy, int scrn,
/* ERROR!!! */
return GL_FALSE;
} else if (--pdp->refcount == 0) {
+#if 0
+ /*
+ ** NOT_DONE: When a drawable is unbound from one direct
+ ** rendering context and then bound to another, we do not want
+ ** to destroy the drawable data structure each time only to
+ ** recreate it immediatly afterwards when binding to the next
+ ** context. This also causes conflicts with caching of the
+ ** drawable stamp.
+ **
+ ** When GLX 1.3 is integrated, the create and destroy drawable
+ ** functions will have user level counterparts and the memory
+ ** will be able to be recovered.
+ */
+
/* Delete drawable if no longer referenced by any contexts */
(*pdraw->destroyDrawable)(dpy, pdraw->private);
__driMesaRemoveDrawable(pdraw);
Xfree(pdraw);
+#endif
}
psp = pdp->driScreenPriv;