diff options
author | Brian Paul <[email protected]> | 2006-10-13 16:34:25 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-13 16:34:25 +0000 |
commit | 176501dfff14b5bec78af2b3487207d42c26d37a (patch) | |
tree | b114ed316d67c6da4c460b130edc0643b90e8000 /src/mesa/swrast/s_readpix.c | |
parent | 8a9b5518fb946462fe55a62c1da1cab94d6d12cc (diff) |
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.
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 6 |
1 files changed, 2 insertions, 4 deletions
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; |