xf86-video-intel: src/sna/sna.h

Chris Wilson ickle at kemper.freedesktop.org
Sun Feb 8 14:09:01 PST 2015


 src/sna/sna.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 357a798156b10af440dc674cbe580aa127793444
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Feb 8 21:57:51 2015 +0000

    sna: Check against last clip box (not past the end of the boxes)
    
    The end BoxPtr actually points to one past the end of the clip boxes, so
    in order to inspect whether the line is after the clip region, we want
    to look at the last box, i.e. the box before. We also only want to
    ignore the clip if we do not intersect at all, otherwise we need to find
    the start of the clip row.
    
    Reported-by: Matti Hämäläinen <ccr at tnsp.org>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna.h b/src/sna/sna.h
index 2cf664f..4fdb541 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -1196,7 +1196,7 @@ find_clip_box_for_y(const BoxRec *begin, const BoxRec *end, int16_t y)
 {
     if (begin->y2 > y)
 	    return begin;
-    if (end->y1 <= y)
+    if (y > end[-1].y2)
 	    return end;
 
     return __find_clip_box_for_y(begin, end, y);


More information about the xorg-commit mailing list