rendercheck: 3 commits - main.c t_fill.c

Eric Anholt anholt at kemper.freedesktop.org
Tue May 2 09:38:03 EEST 2006


 main.c   |    5 ++---
 t_fill.c |   10 +++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
diff-tree 0410434d5a10a52cb381d6713d347da759474edd (from 202329633d2ebc370e11b922337df7b412f8d01d)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Mon May 1 22:15:14 2006 -0700

    Include the format of the picture in the fill test failure output.

diff --git a/t_fill.c b/t_fill.c
index 1e6c518..ff61ef3 100644
--- a/t_fill.c
+++ b/t_fill.c
@@ -21,6 +21,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 
 #include "rendercheck.h"
 
@@ -31,11 +32,14 @@ Bool
 fill_test(Display *dpy, picture_info *win, picture_info *src)
 {
 	color4d tested;
+	char name[20];
 
 	get_pixel(dpy, src, 0, 0, &tested);
 	/* Copy the output to the window, so the user sees something visual. */
 	XRenderComposite(dpy, PictOpSrc, src->pict, 0, win->pict, 0, 0, 0, 0,
 	    0, 0, win_width, win_height);
 
-	return eval_diff("fill", &src->color, &tested, 0, 0, is_verbose);
+	strcpy(name, "fill ");
+	describe_format(name, 20 - strlen(name), src->format);
+	return eval_diff(name, &src->color, &tested, 0, 0, is_verbose);
 }
diff-tree 202329633d2ebc370e11b922337df7b412f8d01d (from e0aa3e6f0fe7d4f546079d3f994c4ee8aea14a19)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Mon May 1 22:14:24 2006 -0700

    Fix describing of some more formats.

diff --git a/main.c b/main.c
index f3fd525..dd50b5e 100644
--- a/main.c
+++ b/main.c
@@ -73,9 +73,8 @@ describe_format(char *desc, int len, XRe
 		/* There are bits that are not part of A,R,G,B. Mark them with
 		 * an x.
 		 */
-		snprintf(ad, 4, "x%d", format->depth - (format->direct.red +
-		    format->direct.green + format->direct.blue));
-		if (format->direct.red == 0 || format->direct.green == 0)
+		snprintf(ad, 4, "x%d", format->depth - rc - gc - bc);
+		if (format->direct.red == 0 || format->direct.blue == 0)
 			ashift = format->depth;
 		else
 			ashift = 0;
diff-tree e0aa3e6f0fe7d4f546079d3f994c4ee8aea14a19 (from b7f09efcab3e85b183218438e6e87bd665541fb5)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Mon May 1 20:35:47 2006 -0700

    Correct the comment describing what fill_test does (test the filling of the
    
    pictures, not filling from the pictures).

diff --git a/t_fill.c b/t_fill.c
index a0f82f9..1e6c518 100644
--- a/t_fill.c
+++ b/t_fill.c
@@ -24,9 +24,9 @@
 
 #include "rendercheck.h"
 
-/* Test that filling from a 1x1 repeating picture works as expected.  This is
+/* Test that filling of the 1x1 repeating pictures worked as expected.  This is
  * pretty basic to most of the tests.
-  */
+ */
 Bool
 fill_test(Display *dpy, picture_info *win, picture_info *src)
 {



More information about the xorg-commit mailing list