summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-06 18:08:19 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-06 18:08:19 +0000
commitb7e3aaf773f05ce82405e135c0f99b40b3c2f434 (patch)
tree0658f04501090cf3af27227a4f76b844b4237cd6
parentf30be6f74392f5687ffe8bc9dd2c6dc024ae06c8 (diff)
sna: Use the clipped end-point for recomputing segment length after clipping
References: https://bugs.freedesktop.org/show_bug.cgi?id=45673 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 8732ed44..a8bfe40c 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -5476,9 +5476,6 @@ sna_poly_zero_line_blt(DrawablePtr drawable,
xstart = pt->x + drawable->x;
ystart = pt->y + drawable->y;
- /* x2, y2, oc2 copied to x1, y1, oc1 at top of loop to simplify
- * iteration logic
- */
x2 = xstart;
y2 = ystart;
oc2 = 0;
@@ -5525,8 +5522,8 @@ sna_poly_zero_line_blt(DrawablePtr drawable,
adx, ady, sdx, sdy,
1, 1, octant);
- DBG(("%s: adx=(%d, %d), sdx=(%d, %d)\n",
- __FUNCTION__, adx, ady, sdx, sdy));
+ DBG(("%s: adx=(%d, %d), sdx=(%d, %d), oc1=%d, oc2\n",
+ __FUNCTION__, adx, ady, sdx, sdy, oc1, oc2));
if (adx == 0 || ady == 0) {
if (x1 <= x2) {
b->x1 = x1;
@@ -5658,7 +5655,7 @@ X_continue2:
octant, bias, oc1, oc2) == -1)
continue;
- length = abs(y2 - y);
+ length = abs(y2_clipped - y);
/* if we've clipped the endpoint, always draw the full length
* of the segment, because then the capstyle doesn't matter