From bb5c84fcbc22b4fef28cf4589d6410eb3c35a496 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 1 Jul 2005 01:22:25 +0000 Subject: Remove NEW_RENDERBUFFER stuff. Now, OLD_RENDERBUFFER marks code that needs to eventually be removed when all the drivers are updated to no longer need the SetBuffer() function. --- src/mesa/drivers/x11/xm_api.c | 14 +++++++------- src/mesa/drivers/x11/xm_dd.c | 8 -------- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index f710a29866..bd8b9e6c7b 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1204,9 +1204,7 @@ static GLboolean initialize_visual_and_buffer( int client, XMesaDrawable window, XMesaColormap cmap ) { -#if NEW_RENDERBUFFER struct xmesa_renderbuffer *front_xrb, *back_xrb; -#endif #ifndef XFree86Server XGCValues gcvalues; #endif @@ -1215,7 +1213,6 @@ static GLboolean initialize_visual_and_buffer( int client, assert(b->xm_visual == v); } -#if NEW_RENDERBUFFER if (b) { front_xrb = b->frontxrb; back_xrb = b->backxrb; @@ -1223,7 +1220,6 @@ static GLboolean initialize_visual_and_buffer( int client, else { front_xrb = back_xrb = NULL; } -#endif /* Save true bits/pixel */ v->BitsPerPixel = bits_per_pixel(v); @@ -2637,8 +2633,12 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y, */ void XMesaResizeBuffers( XMesaBuffer b ) { -#if OLD_RENDERBUFFER - xmesa_resize_buffers(ctx, &(b->mesa_buffer), 0, 0 ); -#endif + Window root; + int xpos, ypos; + unsigned int width, height, bw, depth; + GET_CURRENT_CONTEXT(ctx); + XGetGeometry( b->xm_visual->display, b->frontxrb->pixmap, + &root, &xpos, &ypos, &width, &height, &bw, &depth); + xmesa_resize_buffers(ctx, &(b->mesa_buffer), width, height); } diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 201880d5cc..7ab09d444d 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -563,9 +563,7 @@ xmesa_resize_buffers(GLcontext *ctx, GLframebuffer *buffer, xmesa_alloc_back_buffer(xmBuffer, width, height); -#if NEW_RENDERBUFFER _mesa_resize_framebuffer(ctx, buffer, width, height); -#endif } @@ -1022,12 +1020,6 @@ xmesa_update_state( GLcontext *ctx, GLuint new_state ) } } -#if OLD_RENDERBUFFER && 0 - if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) { - xmesa_update_span_funcs(ctx); - } -#endif - if (xmesa->xm_visual->hpcr_clear_flag) { /* this depends on whether we're drawing to the front or back buffer */ /* XXX FIX THIS! */ -- cgit v1.2.3