From 6b998c5584b7b4be84551a7811d04dcff8487cc9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 13 Oct 2006 15:00:35 +0000 Subject: removed obsolete _mesa_pack_rgba_span_chan() --- src/mesa/main/image.c | 72 --------------------------------------------------- src/mesa/main/image.h | 8 ------ 2 files changed, 80 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 59d50dd57d5..367f4d0422d 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1996,78 +1996,6 @@ _mesa_pack_rgba_span_float( GLcontext *ctx, } -/* - * Pack the given RGBA span into client memory at 'dest' address - * in the given pixel format and type. - * Optionally apply the enabled pixel transfer ops. - * Pack into memory using the given packing params struct. - * This is used by glReadPixels and glGetTexImage?D() - * \param ctx - the context - * n - number of pixels in the span - * rgba - the pixels - * format - dest packing format - * type - dest packing data type - * destination - destination packing address - * packing - pixel packing parameters - * transferOps - bitmask of IMAGE_*_BIT operations to apply - */ -void -_mesa_pack_rgba_span_chan( GLcontext *ctx, - GLuint n, CONST GLchan srcRgba[][4], - GLenum dstFormat, GLenum dstType, - GLvoid *dstAddr, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps) -{ - ASSERT((ctx->NewState & _NEW_PIXEL) == 0 || transferOps == 0); - - /* Test for optimized case first */ - if (transferOps == 0 && dstFormat == GL_RGBA && dstType == CHAN_TYPE) { - /* common simple case */ - _mesa_memcpy(dstAddr, srcRgba, n * 4 * sizeof(GLchan)); - } - else if (transferOps == 0 && dstFormat == GL_RGB && dstType == CHAN_TYPE) { - /* common simple case */ - GLuint i; - GLchan *dest = (GLchan *) dstAddr; - for (i = 0; i < n; i++) { - dest[0] = srcRgba[i][RCOMP]; - dest[1] = srcRgba[i][GCOMP]; - dest[2] = srcRgba[i][BCOMP]; - dest += 3; - } - } - else if (transferOps == 0 && dstFormat == GL_RGBA && dstType == GL_UNSIGNED_BYTE) { - /* common simple case */ - GLuint i; - GLubyte *dest = (GLubyte *) dstAddr; - for (i = 0; i < n; i++) { - dest[0] = CHAN_TO_UBYTE(srcRgba[i][RCOMP]); - dest[1] = CHAN_TO_UBYTE(srcRgba[i][GCOMP]); - dest[2] = CHAN_TO_UBYTE(srcRgba[i][BCOMP]); - dest[3] = CHAN_TO_UBYTE(srcRgba[i][ACOMP]); - dest += 4; - } - } - else { - /* general solution */ - GLuint i; - GLfloat rgba[MAX_WIDTH][4]; - assert(n <= MAX_WIDTH); - /* convert color components to floating point */ - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = CHAN_TO_FLOAT(srcRgba[i][RCOMP]); - rgba[i][GCOMP] = CHAN_TO_FLOAT(srcRgba[i][GCOMP]); - rgba[i][BCOMP] = CHAN_TO_FLOAT(srcRgba[i][BCOMP]); - rgba[i][ACOMP] = CHAN_TO_FLOAT(srcRgba[i][ACOMP]); - } - _mesa_pack_rgba_span_float(ctx, n, (const GLfloat (*)[4]) rgba, - dstFormat, dstType, dstAddr, - dstPacking, transferOps); - } -} - - #define SWAP2BYTE(VALUE) \ { \ GLubyte *bytes = (GLubyte *) &(VALUE); \ diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 50b79f721e3..c30f56e6d4a 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -123,14 +123,6 @@ _mesa_pack_rgba_span_float( GLcontext *ctx, GLuint transferOps ); -extern void -_mesa_pack_rgba_span_chan( GLcontext *ctx, - GLuint n, CONST GLchan rgba[][4], - GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ); - - extern void _mesa_unpack_color_span_chan( GLcontext *ctx, GLuint n, GLenum dstFormat, GLchan dest[], -- cgit v1.2.3