mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
glx/dri: Avoid a weird indirection in driFetchDrawable
The gc already has ->psc set, just use it rather than walking all the way back to the display private to find it. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18473>
This commit is contained in:
parent
333895bebc
commit
fed3643eb9
1 changed files with 2 additions and 3 deletions
|
|
@ -342,7 +342,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
|
|||
Display *dpy = gc->psc->dpy;
|
||||
struct glx_display *const priv = __glXInitialize(dpy);
|
||||
__GLXDRIdrawable *pdraw;
|
||||
struct glx_screen *psc;
|
||||
struct glx_screen *psc = gc->psc;
|
||||
struct glx_config *config = gc->config;
|
||||
unsigned int type;
|
||||
|
||||
|
|
@ -352,7 +352,6 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
|
|||
if (glxDrawable == None)
|
||||
return NULL;
|
||||
|
||||
psc = priv->screens[gc->screen];
|
||||
if (priv->drawHash == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -366,7 +365,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
|
|||
|
||||
/* if this is a no-config context, infer the fbconfig from the drawable */
|
||||
if (config == NULL)
|
||||
config = driInferDrawableConfig(gc->psc, glxDrawable);
|
||||
config = driInferDrawableConfig(psc, glxDrawable);
|
||||
if (config == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue