summaryrefslogtreecommitdiff
path: root/src/sna/fb
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-08 20:48:40 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-08 22:29:43 +0100
commit8be00b6d4767ffc09328d246d02ee75312ad5842 (patch)
treea183ac6d928746673976cb2400beca382580aa20 /src/sna/fb
parent0457935a70f6c1ae06f61f9ad0dd1bdc825465fa (diff)
sna: Substitute the reduce clip region for fallback ops
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/fb')
-rw-r--r--src/sna/fb/fbclip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/fb/fbclip.c b/src/sna/fb/fbclip.c
index 9b33e4ab..5a8eefa0 100644
--- a/src/sna/fb/fbclip.c
+++ b/src/sna/fb/fbclip.c
@@ -98,8 +98,10 @@ fbClipBoxes(const RegionRec *region, const BoxRec *box, const BoxRec **end)
c0 = (const BoxRec *)region->data + 1;
c1 = c0 + region->data->numRects;
- c0 = find_c0(c0, c1, box->y1);
- c1 = find_c1(c0, c1, box->y2);
+ if (c0->y2 <= box->y1)
+ c0 = find_c0(c0, c1, box->y1);
+ if (c1[-1].y1 >= box->y2)
+ c1 = find_c1(c0, c1, box->y2);
DBG(("%s: c0=(%d, %d),(%d, %d); c1=(%d, %d),(%d, %d)\n",
__FUNCTION__,