diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-11-28 15:56:06 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-11-28 15:56:06 +0000 |
commit | 0f8daaf6704090fb720a2462710d2342e532308a (patch) | |
tree | 9e50913e0a0b4d9c78637b312698bb6707243ff5 | |
parent | 1b94df053d9eabf774d7f5c957f96aeedfe29f51 (diff) |
mask is always non-null in write_rgba_pixels and write_monorgba_pixels
-rw-r--r-- | src/mesa/swrast/s_spantemp.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mesa/swrast/s_spantemp.h b/src/mesa/swrast/s_spantemp.h index d8efe98f41..ce01c987e4 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]); } } } |