From 23b314729c43101e515e2625db2a2401c72c2596 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 30 Oct 2011 15:24:21 +0000 Subject: sna: Rewrite box32_add_rect() to enable int32_t promotion Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index d227184c..36665448 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; } -- cgit v1.2.3