From 97ae4297541e52af9f47cdc1e4f65ee06ecb78ba Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 16 Sep 2020 11:21:10 -0400 Subject: [PATCH] glx: Eliminate some stub functions for !GLX_DIRECT_RENDERING Move the ifdefs into the corresponding (real) function bodies. No functional change, just making this file's style consistent. Reviewed-by: Eric Anholt Part-of: --- src/glx/glx_pbuffer.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index 72833526daa..73835b5cced 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -188,12 +188,14 @@ determineTextureFormat(const int *attribs, int numAttribs) return 0; } +#endif static GLboolean CreateDRIDrawable(Display *dpy, struct glx_config *config, XID drawable, XID glxdrawable, const int *attrib_list, size_t num_attribs) { +#ifdef GLX_DIRECT_RENDERING struct glx_display *const priv = __glXInitialize(dpy); __GLXDRIdrawable *pdraw; struct glx_screen *psc; @@ -221,6 +223,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config, pdraw->textureTarget = determineTextureTarget(attrib_list, num_attribs); pdraw->textureFormat = determineTextureFormat(attrib_list, num_attribs); +#endif return GL_TRUE; } @@ -228,6 +231,7 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config, static void DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) { +#ifdef GLX_DIRECT_RENDERING struct glx_display *const priv = __glXInitialize(dpy); __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); XID xid; @@ -239,24 +243,8 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) if (destroy_xdrawable) XFreePixmap(priv->dpy, xid); } -} - -#else - -static GLboolean -CreateDRIDrawable(Display *dpy, const struct glx_config * fbconfig, - XID drawable, XID glxdrawable, - const int *attrib_list, size_t num_attribs) -{ - return GL_TRUE; -} - -static void -DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) -{ -} - #endif +} /** * Get a drawable's attribute.