minor clean-up
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 26 Apr 2006 03:19:54 +0000 (03:19 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 26 Apr 2006 03:19:54 +0000 (03:19 +0000)
src/mesa/drivers/x11/xm_dd.c

index 516b238d6ebb57f7d728f28320aa6e5f8564cdb4..2056366a91493a63a304b48719ead11a1ff5e4ed 100644 (file)
@@ -997,18 +997,18 @@ xmesa_update_state( GLcontext *ctx, GLbitfield new_state )
     * renderbuffer span/clear funcs.
     */
    if (new_state & (_NEW_COLOR | _NEW_PIXEL | _NEW_BUFFERS)) {
+      XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
       struct xmesa_renderbuffer *front_xrb, *back_xrb;
 
-      front_xrb = XMESA_BUFFER(ctx->DrawBuffer)->frontxrb;
+      front_xrb = xmbuf->frontxrb;
       if (front_xrb) {
          xmesa_set_renderbuffer_funcs(front_xrb, xmesa->pixelformat,
                                       xmesa->xm_visual->BitsPerPixel);
          front_xrb->clearFunc = clear_pixmap;
       }
 
-      back_xrb = XMESA_BUFFER(ctx->DrawBuffer)->backxrb;
+      back_xrb = xmbuf->backxrb;
       if (back_xrb) {
-         XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
          xmesa_set_renderbuffer_funcs(back_xrb, xmesa->pixelformat,
                                       xmesa->xm_visual->BitsPerPixel);
          if (xmbuf->backxrb->pixmap) {