added another fast-path in _mesa_unpack_ubyte_color_spa(), more comments
This commit is contained in:
parent
c3f0a511a7
commit
b09a4cd913
|
@ -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
|
* Mesa 3-D graphics library
|
||||||
|
@ -3247,7 +3247,6 @@ _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
|
||||||
ASSERT(ctx->Visual->RGBAflag);
|
ASSERT(ctx->Visual->RGBAflag);
|
||||||
|
|
||||||
applyTransferOps &= (ctx->Pixel.ScaleOrBiasRGBA ||
|
applyTransferOps &= (ctx->Pixel.ScaleOrBiasRGBA ||
|
||||||
ctx->Pixel.MapColorFlag ||
|
|
||||||
ctx->Pixel.MapColorFlag);
|
ctx->Pixel.MapColorFlag);
|
||||||
|
|
||||||
/* Try simple cases first */
|
/* Try simple cases first */
|
||||||
|
@ -3291,8 +3290,10 @@ _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dstFormat == GL_ALPHA && srcFormat == GL_ALPHA) {
|
else if (dstFormat == srcFormat) {
|
||||||
MEMCPY( dest, source, n * sizeof(GLubyte) );
|
GLint comps = gl_components_in_format(srcFormat);
|
||||||
|
assert(comps > 0);
|
||||||
|
MEMCPY( dest, source, n * comps * sizeof(GLubyte) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3363,8 +3364,10 @@ _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX this is where more color table lookups, convolution and
|
* XXX This is where more color table lookups, convolution,
|
||||||
* histogram would take place, if implemented.
|
* histograms, minmax, color matrix, etc would take place if
|
||||||
|
* implemented.
|
||||||
|
* See figure 3.7 in the OpenGL 1.2 specification for more info.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue