diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 17:23:59 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 18:26:35 +0000 |
commit | b56971986d2d495aa38f015beb659fb12f0d433a (patch) | |
tree | 9a03355f243e46ef944559e7c0df00db2334d4f3 | |
parent | 358a0861e642c26d925a69656039b4c95adba237 (diff) |
sna: Trim the clipped Segment to the right length
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 4b997a54..a6e211d2 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -6687,12 +6687,6 @@ rectangle_continue: continue; length = abs(x2 - x1); - - /* if we've clipped the endpoint, always draw the full length - * of the segment, because then the capstyle doesn't matter - */ - if (pt2_clipped) - length++; if (length == 0) continue; @@ -6713,7 +6707,7 @@ rectangle_continue: b->x1 = x1; b->y2 = b->y1 = y1; - while (length--) { + while (--length) { e += e1; x1++; if (e >= 0) { @@ -6765,12 +6759,6 @@ X_continue2: continue; length = abs(y2 - y1); - - /* if we've clipped the endpoint, always draw the full length - * of the segment, because then the capstyle doesn't matter - */ - if (pt2_clipped) - length++; if (length == 0) continue; @@ -6792,7 +6780,7 @@ X_continue2: b->x2 = b->x1 = x1; b->y1 = y1; - while (length--) { + while (--length) { e += e1; y1 += sdy; if (e >= 0) { |