summaryrefslogtreecommitdiff
path: root/glx/glxcmds.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-07-21 18:16:38 -0400
committerKristian Høgsberg <krh@redhat.com>2008-07-24 13:34:24 -0400
commit24dddcd0ef845f4120f8588dc63ec754338ffac8 (patch)
treeba660c3a6ad41b8e3acc2778f3f98d87128194bc /glx/glxcmds.c
parent5c1e254cc85e9ad409b0217780545c29f62d5feb (diff)
Drop unnecessary linked list of contexts from GLXDrawable.
Diffstat (limited to 'glx/glxcmds.c')
-rw-r--r--glx/glxcmds.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 083113584..ea70ca478 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -147,8 +147,10 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig *config,
void
__glXContextDestroy(__GLXcontext *context)
{
- if (!context->isDirect)
- __glXDeassociateContext(context);
+ if (!context->isDirect) {
+ __glXUnrefDrawable(context->drawPriv);
+ __glXUnrefDrawable(context->readPriv);
+ }
__glXFlushContextCache();
}
@@ -618,7 +620,10 @@ DoMakeCurrent(__GLXclientState *cl,
return __glXError(GLXBadContext);
}
__glXFlushContextCache();
- __glXDeassociateContext(prevglxc);
+ if (!glxc->isDirect) {
+ __glXUnrefDrawable(glxc->drawPriv);
+ __glXUnrefDrawable(glxc->readPriv);
+ }
}
@@ -644,9 +649,8 @@ DoMakeCurrent(__GLXclientState *cl,
}
glxc->isCurrent = GL_TRUE;
- __glXAssociateContext(glxc);
- assert(drawPriv->drawGlxc == glxc);
- assert(readPriv->readGlxc == glxc);
+ __glXRefDrawable(glxc->drawPriv);
+ __glXRefDrawable(glxc->readPriv);
}
if (prevglxc) {