From 80401f4fe54142c16ea7578b587529610b68cb67 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 13 Mar 2013 11:01:45 +0000 Subject: 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. --- src/sna/sna_trapezoids.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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, -- cgit v1.2.3