diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-11-09 01:04:50 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-11-09 01:04:50 +0000 |
commit | c55c963f4c3ec6101241501de0f759520b985853 (patch) | |
tree | 55d6ad640a2c902496c46bf916690a4f82606ab5 /src/mesa/swrast | |
parent | 4084e3c215d4db6370422fc718217bade7445618 (diff) |
Removed _swrast_clip_pixelrect(). Use _mesa_clip_drawpixels() instead.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 47 | ||||
-rw-r--r-- | src/mesa/swrast/s_drawpix.h | 7 |
2 files changed, 1 insertions, 53 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 00cc5e83c0..74c820c43b 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -40,53 +40,6 @@ #include "s_zoom.h" - -/* - * Given the dest position, size and skipPixels and skipRows values - * for a glDrawPixels command, perform clipping of the image bounds - * so the result lies withing the context's buffer bounds. - * Return: GL_TRUE if image is ready for drawing - * GL_FALSE if image was completely clipped away (draw nothing) - */ -GLboolean -_swrast_clip_pixelrect(const GLcontext *ctx, - GLint *destX, GLint *destY, - GLsizei *width, GLsizei *height, - GLint *skipPixels, GLint *skipRows) -{ - const GLframebuffer *buffer = ctx->DrawBuffer; - - /* left clipping */ - if (*destX < buffer->_Xmin) { - *skipPixels += (buffer->_Xmin - *destX); - *width -= (buffer->_Xmin - *destX); - *destX = buffer->_Xmin; - } - /* right clipping */ - if (*destX + *width > buffer->_Xmax) - *width -= (*destX + *width - buffer->_Xmax); - - if (*width <= 0) - return GL_FALSE; - - /* bottom clipping */ - if (*destY < buffer->_Ymin) { - *skipRows += (buffer->_Ymin - *destY); - *height -= (buffer->_Ymin - *destY); - *destY = buffer->_Ymin; - } - /* top clipping */ - if (*destY + *height > buffer->_Ymax) - *height -= (*destY + *height - buffer->_Ymax); - - if (*height <= 0) - return GL_TRUE; - - return GL_TRUE; -} - - - /* * Try to do a fast and simple RGB(a) glDrawPixels. * Return: GL_TRUE if success, GL_FALSE if slow path must be used instead diff --git a/src/mesa/swrast/s_drawpix.h b/src/mesa/swrast/s_drawpix.h index 605a293dae..66067115dd 100644 --- a/src/mesa/swrast/s_drawpix.h +++ b/src/mesa/swrast/s_drawpix.h @@ -31,11 +31,6 @@ #include "mtypes.h" #include "swrast.h" - -extern GLboolean -_swrast_clip_pixelrect(const GLcontext *ctx, - GLint *destX, GLint *destY, - GLsizei *width, GLsizei *height, - GLint *skipPixels, GLint *skipRows); +/* XXX kill this header? */ #endif |