diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-29 10:26:08 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-29 10:34:10 +0100 |
commit | 719626ef7918d5cd69d13f983b8b615aefe215d6 (patch) | |
tree | 12eaaca80817364235cb302906de0f5b49ac08a5 | |
parent | 32a9e0352a1e28509580d84bfc5377d8fae913c4 (diff) |
sna: Increment clip box when short-circuiting the iteration
Reported-by: nkalkhof@web.de
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index fead5a19..3c1a65e6 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1968,10 +1968,12 @@ no_damage_clipped: if (y + 1 <= c->y1) break; - if (X2 <= c->x1) - continue; if (X1 >= c->x2) break; + if (X2 <= c->x1) { + c++; + continue; + } b->x1 = c->x1; b->x2 = c->x2; @@ -1981,6 +1983,8 @@ no_damage_clipped: b->x1 = X1; if (b->x2 > X2) b->x2 = X2; + if (b->x2 <= b->x1) + continue; b->x1 += dx; b->x2 += dx; @@ -2073,10 +2077,12 @@ damage_clipped: if (y + 1 <= c->y1) break; - if (X2 <= c->x1) - continue; if (X1 >= c->x2) break; + if (X2 <= c->x1) { + c++; + continue; + } b->x1 = c->x1; b->x2 = c->x2; @@ -2086,6 +2092,8 @@ damage_clipped: b->x1 = X1; if (b->x2 > X2) b->x2 = X2; + if (b->x2 <= b->x1) + continue; b->x1 += dx; b->x2 += dx; |