From 8e5650d7f49c85c236411cc926c5c251739e6c21 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 24 Mar 2006 22:30:55 +0000 Subject: no need to pass ctx to _mesa_clip_to_region() --- src/mesa/drivers/dri/i915/intel_pixel_copy.c | 4 ++-- src/mesa/drivers/dri/i915/intel_pixel_draw.c | 2 +- src/mesa/drivers/dri/i915/intel_tex_copy.c | 2 +- src/mesa/main/image.c | 3 +-- src/mesa/main/image.h | 3 +-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_pixel_copy.c b/src/mesa/drivers/dri/i915/intel_pixel_copy.c index eb7f256931..75cf4bdfe6 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_copy.c @@ -182,7 +182,7 @@ static GLboolean do_texture_copypixels( GLcontext *ctx, GLint orig_x = srcx; GLint orig_y = srcy; - if (!_mesa_clip_to_region(ctx, 0, 0, src->pitch, src->height, + if (!_mesa_clip_to_region(0, 0, src->pitch, src->height, &srcx, &srcy, &width, &height)) goto out; @@ -276,7 +276,7 @@ static GLboolean do_blit_copypixels( GLcontext *ctx, delta_x = srcx - dstx; delta_y = srcy - dsty; - if (!_mesa_clip_to_region(ctx, 0, 0, src->pitch, src->height, + if (!_mesa_clip_to_region(0, 0, src->pitch, src->height, &srcx, &srcy, &width, &height)) goto out; diff --git a/src/mesa/drivers/dri/i915/intel_pixel_draw.c b/src/mesa/drivers/dri/i915/intel_pixel_draw.c index 98581e86ce..71e251c66d 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_draw.c @@ -154,7 +154,7 @@ static GLboolean do_texture_drawpixels( GLcontext *ctx, const GLint orig_x = dstx; const GLint orig_y = dsty; - if (!_mesa_clip_to_region(ctx, 0, 0, dst->pitch, dst->height, + if (!_mesa_clip_to_region(0, 0, dst->pitch, dst->height, &dstx, &dsty, &width, &height)) goto out; diff --git a/src/mesa/drivers/dri/i915/intel_tex_copy.c b/src/mesa/drivers/dri/i915/intel_tex_copy.c index ac1e843d0a..a0b23c4f4c 100644 --- a/src/mesa/drivers/dri/i915/intel_tex_copy.c +++ b/src/mesa/drivers/dri/i915/intel_tex_copy.c @@ -109,7 +109,7 @@ static GLboolean do_copy_texsubimage( struct intel_context *intel, GLuint window_y; const struct gl_framebuffer *fb = ctx->DrawBuffer; - if (_mesa_clip_to_region(ctx, fb->_Xmin, fb->_Ymin, fb->_Xmax, fb->_Ymax, + if (_mesa_clip_to_region(fb->_Xmin, fb->_Ymin, fb->_Xmax, fb->_Ymax, &x, &y, &width, &height)) { /* Update dst for clipped src. Need to also clip the source rect. */ diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 263ce8ef64..ee44e37295 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -4319,8 +4319,7 @@ _mesa_clip_readpixels(const GLcontext *ctx, * \return GL_FALSE if rect is totally clipped, GL_TRUE otherwise. */ GLboolean -_mesa_clip_to_region(GLcontext *ctx, - GLint xmin, GLint ymin, +_mesa_clip_to_region(GLint xmin, GLint ymin, GLint xmax, GLint ymax, GLint *x, GLint *y, GLsizei *width, GLsizei *height ) diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 7953192c52..84faa03255 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -217,8 +217,7 @@ _mesa_clip_readpixels(const GLcontext *ctx, struct gl_pixelstore_attrib *pack); extern GLboolean -_mesa_clip_to_region(GLcontext *ctx, - GLint xmin, GLint ymin, +_mesa_clip_to_region(GLint xmin, GLint ymin, GLint xmax, GLint ymax, GLint *x, GLint *y, GLsizei *width, GLsizei *height ); -- cgit v1.2.3