diff options
author | Adam Jackson <ajax@redhat.com> | 2011-03-21 11:59:29 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2011-03-28 12:46:38 -0400 |
commit | a48dadc98a28c969741979b70b7a639f24f4cbbd (patch) | |
tree | 41ef8e98c326f81e4ff26b3eaae461addb880e4d /glx/glxserver.h | |
parent | 30d6947cee714385cf62a40ea6fa6d2e68388c78 (diff) |
glx: Reimplement context tags
This would let you do a constant-time context lookup, but if that's your
performance problem you have two problems. Just use the context's XID
as the tag value instead.
In order to do this, we have to defer destroying a context until it
actually goes unreferenced, as you're allowed to mention a context tag
after you've (ostensibly) destroyed the context, as long as it's still
your current context. Thus, change DestroyContext to merely mark the
context as dead if it's a current context, and call down to actual
resource destruction (and XID reclamation) in StopUsingContext.
Also, stop trying to delete context state from DrawableGone. This was
always broken, as GLX does not say that contexts are destroyed when
their drawables are destroyed. But with the above change to defer
context destruction, this would trigger a server crash on client exit as
we'd free the context state twice.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx/glxserver.h')
-rw-r--r-- | glx/glxserver.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/glx/glxserver.h b/glx/glxserver.h index 1daf97758..f10c8fe12 100644 --- a/glx/glxserver.h +++ b/glx/glxserver.h @@ -158,13 +158,6 @@ struct __GLXclientStateRec { GLbyte *largeCmdBuf; GLint largeCmdBufSize; - /* - ** Keep a list of all the contexts that are current for this client's - ** threads. - */ - __GLXcontext **currentContexts; - GLint numCurrentContexts; - /* Back pointer to X client record */ ClientPtr client; |