summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_buffers.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-01-26 18:01:37 -0800
committerEric Anholt <eric@anholt.net>2010-01-26 18:02:21 -0800
commitc8e6a0f2f8637d803006d207bb2fb8e4292bdb28 (patch)
treef7b1bc611a20f8c913389b55fcfd6ca032545674 /src/mesa/drivers/dri/intel/intel_buffers.c
parent41f4d82ba8e2497d9fe27f55cb1b8707862fed46 (diff)
intel: Use a handy helper in glReadPixels source clipping.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_buffers.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 9171bab63a..5bf0bdb963 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -31,41 +31,6 @@
#include "intel_batchbuffer.h"
#include "main/framebuffer.h"
-
-/**
- * XXX move this into a new dri/common/cliprects.c file.
- */
-GLboolean
-intel_intersect_cliprects(drm_clip_rect_t * dst,
- const drm_clip_rect_t * a,
- const drm_clip_rect_t * b)
-{
- GLint bx = b->x1;
- GLint by = b->y1;
- GLint bw = b->x2 - bx;
- GLint bh = b->y2 - by;
-
- if (bx < a->x1)
- bw -= a->x1 - bx, bx = a->x1;
- if (by < a->y1)
- bh -= a->y1 - by, by = a->y1;
- if (bx + bw > a->x2)
- bw = a->x2 - bx;
- if (by + bh > a->y2)
- bh = a->y2 - by;
- if (bw <= 0)
- return GL_FALSE;
- if (bh <= 0)
- return GL_FALSE;
-
- dst->x1 = bx;
- dst->y1 = by;
- dst->x2 = bx + bw;
- dst->y2 = by + bh;
-
- return GL_TRUE;
-}
-
/**
* Return pointer to current color drawing region, or NULL.
*/