summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-01-12 16:12:52 +0000
committerBrian Paul <[email protected]>2002-01-12 16:12:52 +0000
commit21cb88911a1976b4fcdfe4706d3e9853848d980d (patch)
tree76c8f42189f61d14c702f2e5963778e60fbda9ac /src/mesa/swrast/s_readpix.c
parent3e276d43a22b043c1aa33c21ef3513a66d382dca (diff)
don't apply scissor box in read_fast_rgba_pixels()
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 5fc03da27d7..c4476c85ad2 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -1,10 +1,10 @@
-/* $Id: s_readpix.c,v 1.12 2001/05/16 20:27:12 brianp Exp $ */
+/* $Id: s_readpix.c,v 1.13 2002/01/12 16:12:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -246,24 +246,24 @@ read_fast_rgba_pixels( GLcontext *ctx,
rowLength = width;
/* horizontal clipping */
- if (srcX < ctx->ReadBuffer->_Xmin) {
- skipPixels += (ctx->ReadBuffer->_Xmin - srcX);
- readWidth -= (ctx->ReadBuffer->_Xmin - srcX);
- srcX = ctx->ReadBuffer->_Xmin;
+ if (srcX < 0) {
+ skipPixels -= srcX;
+ readWidth += srcX;
+ srcX = 0;
}
- if (srcX + readWidth > ctx->ReadBuffer->_Xmax)
- readWidth -= (srcX + readWidth - ctx->ReadBuffer->_Xmax);
+ if (srcX + readWidth > ctx->ReadBuffer->Width)
+ readWidth -= (srcX + readWidth - ctx->ReadBuffer->Width);
if (readWidth <= 0)
return GL_TRUE;
/* vertical clipping */
- if (srcY < ctx->ReadBuffer->_Ymin) {
- skipRows += (ctx->ReadBuffer->_Ymin - srcY);
- readHeight -= (ctx->ReadBuffer->_Ymin - srcY);
- srcY = ctx->ReadBuffer->_Ymin;
+ if (srcY < 0) {
+ skipRows -= srcY;
+ readHeight += srcY;
+ srcY = 0;
}
- if (srcY + readHeight > ctx->ReadBuffer->_Ymax)
- readHeight -= (srcY + readHeight - ctx->ReadBuffer->_Ymax);
+ if (srcY + readHeight > ctx->ReadBuffer->Height)
+ readHeight -= (srcY + readHeight - ctx->ReadBuffer->Height);
if (readHeight <= 0)
return GL_TRUE;