mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-04 22:36:10 +00:00
Drop unnecessary linked list of contexts from GLXDrawable.
This commit is contained in:
parent
5c1e254cc8
commit
24dddcd0ef
3 changed files with 10 additions and 83 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue