xf86-video-intel: src/sna/sna_trapezoids.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Mar 13 04:20:21 PDT 2013


 src/sna/sna_trapezoids.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 80401f4fe54142c16ea7578b587529610b68cb67
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Mar 13 11:01:45 2013 +0000

    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.

diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 2f346ea..ce0835a 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,


More information about the xorg-commit mailing list