xf86-video-intel: src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Oct 30 08:25:05 PDT 2011


 src/sna/sna_accel.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 23b314729c43101e515e2625db2a2401c72c2596
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Oct 30 15:24:21 2011 +0000

    sna: Rewrite box32_add_rect() to enable int32_t promotion
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index d227184..3666544 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1077,15 +1077,17 @@ static inline void box32_add_rect(Box32Rec *box, const xRectangle *r)
 {
 	int32_t v;
 
-	if (box->x1 > r->x)
-		box->x1 = r->x;
-	v = r->x + r->width;
+	v = r->x;
+	if (box->x1 > v)
+		box->x1 = v;
+	v += r->width;
 	if (box->x2 < v)
 		box->x2 = v;
 
-	if (box->y1 > r->y)
-		box->y1 = r->y;
-	v = r->y + r->height;
+	v = r->y;
+	if (box->y1 > v)
+		box->y1 = ;
+	v += r->height;
 	if (box->y2 < v)
 		box->y2 = v;
 }


More information about the xorg-commit mailing list