glx: Use XSaveContext, delete glxhash.c
libX11 has a perfectly good XID-based hash table we can be using, let's. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18474>
This commit is contained in:
@@ -195,7 +195,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (__glxHashInsert(priv->drawHash, glxdrawable, pdraw)) {
|
||||
if (XSaveContext(dpy, glxdrawable, priv->drawHash, (void *)pdraw)) {
|
||||
(*pdraw->destroyDrawable) (pdraw);
|
||||
return GL_FALSE;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable)
|
||||
|
||||
if (priv != NULL && pdraw != NULL) {
|
||||
(*pdraw->destroyDrawable) (pdraw);
|
||||
__glxHashDelete(priv->drawHash, drawable);
|
||||
XDeleteContext(dpy, drawable, priv->drawHash);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user