From 40636fe6f2763e6be4141516a9eba5004b371915 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Sep 2009 17:16:19 -0600 Subject: gallium/xlib: minor clean-ups --- src/gallium/state_trackers/glx/xlib/xm_api.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 2c7b27a1f..957002ddd 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -668,7 +668,7 @@ XMesaVisual XMesaCreateVisual( Display *display, * at a later time. */ v->visinfo = (XVisualInfo *) MALLOC(sizeof(*visinfo)); - if(!v->visinfo) { + if (!v->visinfo) { _mesa_free(v); return NULL; } @@ -781,8 +781,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) if (screen == NULL) goto fail; - pipe = driver.create_pipe_context( screen, - (void *)c ); + pipe = driver.create_pipe_context(screen, (void *) c); if (pipe == NULL) goto fail; @@ -795,23 +794,15 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) mesaCtx = c->st->ctx; c->st->ctx->DriverCtx = c; -#if 00 - _mesa_enable_sw_extensions(mesaCtx); - _mesa_enable_1_3_extensions(mesaCtx); - _mesa_enable_1_4_extensions(mesaCtx); - _mesa_enable_1_5_extensions(mesaCtx); - _mesa_enable_2_0_extensions(mesaCtx); -#endif - return c; - fail: +fail: if (c->st) st_destroy_context(c->st); else if (pipe) pipe->destroy(pipe); - FREE(c); + _mesa_free(c); return NULL; } @@ -1165,7 +1156,7 @@ void XMesaFlush( XMesaContext c ) XMesaBuffer XMesaFindBuffer( Display *dpy, Drawable d ) { XMesaBuffer b; - for (b=XMesaBufferList; b; b=b->Next) { + for (b = XMesaBufferList; b; b = b->Next) { if (b->drawable == d && b->xm_visual->display == dpy) { return b; } -- cgit v1.2.3