From 0f8daaf6704090fb720a2462710d2342e532308a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 Nov 2002 15:56:06 +0000 Subject: [PATCH] mask is always non-null in write_rgba_pixels and write_monorgba_pixels --- src/mesa/swrast/s_spantemp.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/mesa/swrast/s_spantemp.h b/src/mesa/swrast/s_spantemp.h index d8efe98f41a..ce01c987e48 100644 --- a/src/mesa/swrast/s_spantemp.h +++ b/src/mesa/swrast/s_spantemp.h @@ -1,4 +1,4 @@ -/* $Id: s_spantemp.h,v 1.1 2002/11/13 16:54:01 brianp Exp $ */ +/* $Id: s_spantemp.h,v 1.2 2002/11/28 15:56:06 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -135,13 +135,12 @@ NAME(write_rgba_pixels)( const GLcontext *ctx, GLuint n, SPAN_VARS #endif GLuint i; - if (mask) { - for (i = 0; i < n; i++) { - if (mask[i]) { - INIT_PIXEL_PTR(pixel, x[i], y[i]); - STORE_RGBA_PIXEL(pixel, rgba[i][RCOMP], rgba[i][GCOMP], - rgba[i][BCOMP], rgba[i][ACOMP]); - } + ASSERT(mask); + for (i = 0; i < n; i++) { + if (mask[i]) { + INIT_PIXEL_PTR(pixel, x[i], y[i]); + STORE_RGBA_PIXEL(pixel, rgba[i][RCOMP], rgba[i][GCOMP], + rgba[i][BCOMP], rgba[i][ACOMP]); } } } @@ -155,13 +154,12 @@ NAME(write_monorgba_pixels)( const GLcontext *ctx, SPAN_VARS #endif GLuint i; - if (mask) { - for (i = 0; i < n; i++) { - if (mask[i]) { - INIT_PIXEL_PTR(pixel, x[i], y[i]); - STORE_RGBA_PIXEL(pixel, color[RCOMP], color[GCOMP], - color[BCOMP], color[ACOMP]); - } + ASSERT(mask); + for (i = 0; i < n; i++) { + if (mask[i]) { + INIT_PIXEL_PTR(pixel, x[i], y[i]); + STORE_RGBA_PIXEL(pixel, color[RCOMP], color[GCOMP], + color[BCOMP], color[ACOMP]); } } } -- 2.30.2