From 176501dfff14b5bec78af2b3487207d42c26d37a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 13 Oct 2006 16:34:25 +0000 Subject: In _mesa_pack_rgba_span_float() we don't need to make a temporary copy of incoming colors when applying pixel transfer ops. In all cases, the caller either indicates there's no pixel transfer ops, or the incoming colors are coming from temporary storage already and can be safely modified. --- src/mesa/swrast/s_readpix.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 3b7fc3f0677..fb39427b621 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -377,8 +377,7 @@ read_rgba_pixels( GLcontext *ctx, GLvoid *dest; dest = _mesa_image_address2d(packing, pixels, width, height, format, type, row, 0); - _mesa_pack_rgba_span_float(ctx, width, - (const GLfloat (*)[4]) src, + _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) src, format, type, dest, packing, transferOps & IMAGE_POST_CONVOLUTION_BITS); src += width * 4; @@ -419,8 +418,7 @@ read_rgba_pixels( GLcontext *ctx, } /* pack the row of RGBA pixels into user's buffer */ - _mesa_pack_rgba_span_float(ctx, width, (CONST GLfloat (*)[4]) rgba, - format, type, dst, + _mesa_pack_rgba_span_float(ctx, width, rgba, format, type, dst, packing, ctx->_ImageTransferState); dst += dstStride; -- cgit v1.2.3