diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-13 11:01:45 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-13 11:02:30 +0000 |
commit | 80401f4fe54142c16ea7578b587529610b68cb67 (patch) | |
tree | 34fde66ddf076cad467c72837b63927945d8ffe2 /src | |
parent | 716723d655a6ee11b090642b759e2542ad712c17 (diff) |
sna/trapezoids: Minimally replace points for TriFan
The realisation dawns that it wasn't the ordering of points within the
triangle, but simply that I was replacing the wrong one.
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_trapezoids.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index 2f346ea3..ce0835a2 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -7827,8 +7827,7 @@ trifan_fallback(CARD8 op, -bounds.x1, -bounds.y1, 1, (pixman_triangle_t *)&tri); for (i = 3; i < n; i++) { - *p[1] = *p[2]; - *p[2] = points[i]; + *p[2 - (i&1)] = points[i]; pixman_add_triangles(image, -bounds.x1, -bounds.y1, 1, (pixman_triangle_t *)&tri); @@ -7866,8 +7865,7 @@ trifan_fallback(CARD8 op, src, dst, maskFormat, xSrc, ySrc, 1, &tri); for (i = 3; i < n; i++) { - *p[1] = *p[2]; - *p[2] = points[i]; + *p[2 - (i&1)] = points[i]; /* Should xSrc,ySrc be updated? */ triangles_fallback(op, src, dst, maskFormat, |