diff options
author | Matt Turner <mattst88@gmail.com> | 2014-09-21 22:53:04 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2014-09-24 09:58:43 -0700 |
commit | 5980fc35c9e2e25a5a53cb1b38245ad763885cca (patch) | |
tree | 2624aec99ec7acade9939fce8fa71cfc73841e73 /src/mesa/drivers/x11 | |
parent | 209eba42ebfc0108ad37b5a83631ed6c019a63c3 (diff) |
mesa: Drop _mesa_getenv() wrapper.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index a47ad741420..ee05f8aaa3d 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -258,7 +258,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, if (dbFlag) { /* Check if the MESA_BACK_BUFFER env var is set */ - char *backbuffer = _mesa_getenv("MESA_BACK_BUFFER"); + char *backbuffer = getenv("MESA_BACK_BUFFER"); if (backbuffer) { if (backbuffer[0]=='p' || backbuffer[0]=='P') { ximageFlag = GL_FALSE; @@ -279,13 +279,13 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, /* Comparing IDs uses less memory but sometimes fails. */ /* XXX revisit this after 3.0 is finished. */ - if (_mesa_getenv("MESA_GLX_VISUAL_HACK")) + if (getenv("MESA_GLX_VISUAL_HACK")) comparePointers = GL_TRUE; else comparePointers = GL_FALSE; /* Force the visual to have an alpha channel */ - if (_mesa_getenv("MESA_GLX_FORCE_ALPHA")) + if (getenv("MESA_GLX_FORCE_ALPHA")) alphaFlag = GL_TRUE; /* First check if a matching visual is already in the list */ @@ -350,7 +350,7 @@ static GLint default_depth_bits(void) { int zBits; - const char *zEnv = _mesa_getenv("MESA_GLX_DEPTH_BITS"); + const char *zEnv = getenv("MESA_GLX_DEPTH_BITS"); if (zEnv) zBits = atoi(zEnv); else @@ -362,7 +362,7 @@ static GLint default_alpha_bits(void) { int aBits; - const char *aEnv = _mesa_getenv("MESA_GLX_ALPHA_BITS"); + const char *aEnv = getenv("MESA_GLX_ALPHA_BITS"); if (aEnv) aBits = atoi(aEnv); else @@ -559,11 +559,11 @@ get_env_visual(Display *dpy, int scr, const char *varname) int depth, xclass = -1; XVisualInfo *vis; - if (!_mesa_getenv( varname )) { + if (!getenv( varname )) { return NULL; } - strncpy( value, _mesa_getenv(varname), 100 ); + strncpy( value, getenv(varname), 100 ); value[99] = 0; sscanf( value, "%s %d", type, &depth ); @@ -1428,7 +1428,7 @@ Fake_glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ) if (b) { XMesaDestroyBuffer(b); } - else if (_mesa_getenv("MESA_DEBUG")) { + else if (getenv("MESA_DEBUG")) { _mesa_warning(NULL, "Mesa: glXDestroyGLXPixmap: invalid pixmap\n"); } } @@ -1504,7 +1504,7 @@ Fake_glXSwapBuffers( Display *dpy, GLXDrawable drawable ) if (buffer) { XMesaSwapBuffers(buffer); } - else if (_mesa_getenv("MESA_DEBUG")) { + else if (getenv("MESA_DEBUG")) { _mesa_warning(NULL, "glXSwapBuffers: invalid drawable 0x%x\n", (int) drawable); } @@ -1522,7 +1522,7 @@ Fake_glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, if (buffer) { XMesaCopySubBuffer(buffer, x, y, width, height); } - else if (_mesa_getenv("MESA_DEBUG")) { + else if (getenv("MESA_DEBUG")) { _mesa_warning(NULL, "Mesa: glXCopySubBufferMESA: invalid drawable\n"); } } diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index d860569eccc..2d66dbdcdf1 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -582,7 +582,7 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b, } v->mesa_visual.indexBits = 0; - if (_mesa_getenv("MESA_NO_DITHER")) { + if (getenv("MESA_NO_DITHER")) { v->dithered_pf = v->undithered_pf; } @@ -592,7 +592,7 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b, * which can help Brian figure out what's going on when a user * reports bugs. */ - if (_mesa_getenv("MESA_INFO")) { + if (getenv("MESA_INFO")) { printf("X/Mesa visual = %p\n", (void *) v); printf("X/Mesa dithered pf = %u\n", v->dithered_pf); printf("X/Mesa undithered pf = %u\n", v->undithered_pf); @@ -760,7 +760,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, GLint red_bits, green_bits, blue_bits, alpha_bits; /* For debugging only */ - if (_mesa_getenv("MESA_XSYNC")) { + if (getenv("MESA_XSYNC")) { /* This makes debugging X easier. * In your debugger, set a breakpoint on _XError to stop when an * X protocol error is generated. @@ -791,7 +791,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, memcpy(v->visinfo, visinfo, sizeof(*visinfo)); /* check for MESA_GAMMA environment variable */ - gamma = _mesa_getenv("MESA_GAMMA"); + gamma = getenv("MESA_GAMMA"); if (gamma) { v->RedGamma = v->GreenGamma = v->BlueGamma = 0.0; sscanf( gamma, "%f %f %f", &v->RedGamma, &v->GreenGamma, &v->BlueGamma ); |