summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-01-04 15:59:39 -0800
committerEric Anholt <[email protected]>2012-01-06 09:48:47 -0800
commitcedbfc0050af7391b6c8ed54abaa60898208f99d (patch)
tree425cb15afd257a3eda155f7a35b0ad39bc130456 /src/mesa/swrast
parent60982976ee14c271353b9545ca5ac085b97ab9b0 (diff)
swrast: Move the check for fast_copy_pixels() ability to caller.
I'm going to reuse this function from glBlitFramebuffer() handling, which wants to do the same thing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_copypix.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 1dc4286a3c2..8fae01f079d 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -438,14 +438,6 @@ fast_copy_pixels(struct gl_context *ctx,
GLubyte *srcMap, *dstMap;
GLint srcRowStride, dstRowStride;
- if (SWRAST_CONTEXT(ctx)->_RasterMask != 0x0 ||
- ctx->Pixel.ZoomX != 1.0F ||
- ctx->Pixel.ZoomY != 1.0F ||
- ctx->_ImageTransferState) {
- /* can't handle these */
- return GL_FALSE;
- }
-
if (type == GL_COLOR) {
if (dstFb->_NumColorDrawBuffers != 1)
return GL_FALSE;
@@ -582,7 +574,11 @@ _swrast_CopyPixels( struct gl_context *ctx,
if (swrast->NewState)
_swrast_validate_derived( ctx );
- if (fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, type)) {
+ if (!(SWRAST_CONTEXT(ctx)->_RasterMask != 0x0 ||
+ ctx->Pixel.ZoomX != 1.0F ||
+ ctx->Pixel.ZoomY != 1.0F ||
+ ctx->_ImageTransferState) &&
+ fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, type)) {
/* all done */
return;
}