diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-08 18:05:14 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-08 18:53:59 +0000 |
commit | 706d3a97bd3049e60c08d121a3d4d81c03029a87 (patch) | |
tree | 996761bfba56734b900de7e7ae4c6f5c4a0978bb /src/sna/sna_trapezoids.c | |
parent | bc081420a5d6d28c4e6fd5527a70caaa3a8361c4 (diff) |
sna/trapezoids: Fix detection of rectilinearity after projection
A typo confused left and right, rejecting true vertical edges, and worse
might have incurred false positives.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids.c')
-rw-r--r-- | src/sna/sna_trapezoids.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index a85f58e6..4ea1c066 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -3040,15 +3040,15 @@ sna_composite_trapezoids(CARD8 op, for (n = 0; n < ntrap && rectilinear; n++) { int lx1 = pixman_fixed_to_int(traps[n].left.p1.x + pixman_fixed_1_minus_e/2); int lx2 = pixman_fixed_to_int(traps[n].left.p2.x + pixman_fixed_1_minus_e/2); - int rx1 = pixman_fixed_to_int(traps[n].left.p1.x + pixman_fixed_1_minus_e/2); - int rx2 = pixman_fixed_to_int(traps[n].left.p2.x + pixman_fixed_1_minus_e/2); + int rx1 = pixman_fixed_to_int(traps[n].right.p1.x + pixman_fixed_1_minus_e/2); + int rx2 = pixman_fixed_to_int(traps[n].right.p2.x + pixman_fixed_1_minus_e/2); rectilinear &= lx1 == lx2 && rx1 == rx2; } } else if (dst->polyMode != PolyModePrecise) { for (n = 0; n < ntrap && rectilinear; n++) { int lx1 = pixman_fixed_to_grid(traps[n].left.p1.x); - int lx2 = pixman_fixed_to_grid(traps[n].right.p2.x); - int rx1 = pixman_fixed_to_grid(traps[n].left.p1.x); + int lx2 = pixman_fixed_to_grid(traps[n].left.p2.x); + int rx1 = pixman_fixed_to_grid(traps[n].right.p1.x); int rx2 = pixman_fixed_to_grid(traps[n].right.p2.x); int top = pixman_fixed_to_grid(traps[n].top); int bot = pixman_fixed_to_grid(traps[n].bottom); |