glx: s/Display */struct glx_display */ over internal API

We'd like to avoid __glXInitialize as much as possible since it involves
taking a global lock. This means converting internal APIs to operate as
much as possible in terms of something other than a Display *, since if
that's all you have then you're forced to call __glXInitialize to get to
the glx_display.

The contortions in DRI2 displease me, but DRI2 displeases me, so.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>
This commit is contained in:
Adam Jackson
2021-04-23 11:32:17 -04:00
committed by Marge Bot
parent 21411368a3
commit b02b26b87c
8 changed files with 83 additions and 91 deletions

View File

@@ -458,7 +458,7 @@ static void
dri3_wait_x(struct glx_context *gc)
{
struct dri3_drawable *priv = (struct dri3_drawable *)
GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
GetGLXDRIDrawable(gc->psc->display, gc->currentDrawable);
if (priv)
loader_dri3_wait_x(&priv->loader_drawable);
@@ -468,7 +468,7 @@ static void
dri3_wait_gl(struct glx_context *gc)
{
struct dri3_drawable *priv = (struct dri3_drawable *)
GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable);
GetGLXDRIDrawable(gc->psc->display, gc->currentDrawable);
if (priv)
loader_dri3_wait_gl(&priv->loader_drawable);