summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>1999-11-03 18:24:05 +0000
committerBrian Paul <[email protected]>1999-11-03 18:24:05 +0000
commitb09a4cd913e2de612fddf5411185a257da35647c (patch)
treeb7bf496296bbfabf355e68312f8120838f731b3c /src/mesa
parentc3f0a511a725c7b3d3d7d93b1955aaaa2bb32f0d (diff)
added another fast-path in _mesa_unpack_ubyte_color_spa(), more comments
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/image.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 41ce693eb06..075ad16a9c4 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.11 1999/11/03 17:27:05 brianp Exp $ */
+/* $Id: image.c,v 1.12 1999/11/03 18:24:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -3247,7 +3247,6 @@ _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
ASSERT(ctx->Visual->RGBAflag);
applyTransferOps &= (ctx->Pixel.ScaleOrBiasRGBA ||
- ctx->Pixel.MapColorFlag ||
ctx->Pixel.MapColorFlag);
/* Try simple cases first */
@@ -3291,8 +3290,10 @@ _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
return;
}
}
- else if (dstFormat == GL_ALPHA && srcFormat == GL_ALPHA) {
- MEMCPY( dest, source, n * sizeof(GLubyte) );
+ else if (dstFormat == srcFormat) {
+ GLint comps = gl_components_in_format(srcFormat);
+ assert(comps > 0);
+ MEMCPY( dest, source, n * comps * sizeof(GLubyte) );
return;
}
}
@@ -3363,8 +3364,10 @@ _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
/*
- * XXX this is where more color table lookups, convolution and
- * histogram would take place, if implemented.
+ * XXX This is where more color table lookups, convolution,
+ * histograms, minmax, color matrix, etc would take place if
+ * implemented.
+ * See figure 3.7 in the OpenGL 1.2 specification for more info.
*/