From d98fdad3bfc7018740cf781e00fa53ad9a4479cd Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 29 Jan 2001 20:56:32 +0000 Subject: Update implementations of Driver.Clear(). --- src/mesa/drivers/x11/xm_dd.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 7b1fecdd133..f7530d947b3 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.12 2001/01/29 20:47:39 keithw Exp $ */ +/* $Id: xm_dd.c,v 1.13 2001/01/29 20:56:32 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -739,7 +739,7 @@ clear_nbit_ximage( GLcontext *ctx, GLboolean all, -static GLbitfield +static void clear_buffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ) { @@ -747,21 +747,19 @@ clear_buffers( GLcontext *ctx, GLbitfield mask, const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask; /* we can't handle color or index masking */ - if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) { - if (*colorMask != 0xffffffff || ctx->Color.IndexMask != 0xffffffff) - return mask; + if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) { + if (mask & DD_FRONT_LEFT_BIT) { + ASSERT(xmesa->xm_buffer->front_clear_func); + (*xmesa->xm_buffer->front_clear_func)( ctx, all, x, y, width, height ); + mask &= ~DD_FRONT_LEFT_BIT; + } + if (mask & DD_BACK_LEFT_BIT) { + ASSERT(xmesa->xm_buffer->back_clear_func); + (*xmesa->xm_buffer->back_clear_func)( ctx, all, x, y, width, height ); + mask &= ~DD_BACK_LEFT_BIT; + } } - if (mask & DD_FRONT_LEFT_BIT) { - ASSERT(xmesa->xm_buffer->front_clear_func); - (*xmesa->xm_buffer->front_clear_func)( ctx, all, x, y, width, height ); - mask &= ~DD_FRONT_LEFT_BIT; - } - if (mask & DD_BACK_LEFT_BIT) { - ASSERT(xmesa->xm_buffer->back_clear_func); - (*xmesa->xm_buffer->back_clear_func)( ctx, all, x, y, width, height ); - mask &= ~DD_BACK_LEFT_BIT; - } if (mask) _swrast_Clear( ctx, mask, all, x, y, width, height ); } -- cgit v1.2.3