rendercheck: 5 commits - autogen.sh configure.ac main.c Makefile.am ops.c rendercheck.h t_blend.c t_bug7366.c t_composite.c t_dstcoords.c tests.c t_fill.c t_gradient.c t_gtk_argb_xbgr.c t_libreoffice_xrgb.c t_repeat.c t_shmblend.c t_srccoords.c t_triangles.c t_tsrccoords2.c t_tsrccoords.c

Adam Jackson ajax at kemper.freedesktop.org
Wed Mar 9 20:50:14 UTC 2016


 Makefile.am          |    1 
 autogen.sh           |    3 
 configure.ac         |    2 
 main.c               |   68 +++++++++-----
 ops.c                |    2 
 rendercheck.h        |  114 ++++++++++++++++-------
 t_blend.c            |    8 -
 t_bug7366.c          |   32 +++---
 t_composite.c        |   12 +-
 t_dstcoords.c        |    6 -
 t_fill.c             |    6 -
 t_gradient.c         |   32 +++---
 t_gtk_argb_xbgr.c    |   17 ++-
 t_libreoffice_xrgb.c |   24 +++-
 t_repeat.c           |   22 ++--
 t_shmblend.c         |  245 +++++++++++++++++++++++++++++++++++++++++++++++++++
 t_srccoords.c        |   14 +-
 t_triangles.c        |   24 ++--
 t_tsrccoords.c       |   12 +-
 t_tsrccoords2.c      |   14 +-
 tests.c              |  144 +++++++++++++----------------
 21 files changed, 565 insertions(+), 237 deletions(-)

New commits:
commit c828b535a914fdf1da54cc521ebe6bf9078d80ba
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Feb 1 13:48:47 2016 -0800

    autogen: Set a default prefix for patches if unset.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/autogen.sh b/autogen.sh
index 1b15e18..c262d6b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -11,3 +11,6 @@ autoreconf -v --install || exit 1
 cd $ORIGDIR || exit $?
 
 $srcdir/configure --enable-maintainer-mode "$@"
+
+git config --local --get format.subjectPrefix ||
+    git config --local format.subjectPrefix "PATCH rendercheck"
commit 60ed3f88ae40a9cb00d559f92608300f9287cc5e
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Feb 1 13:48:46 2016 -0800

    shmblend: New test for XRenderComposite() from a pixmap in SHM.
    
    There's a giant pile of code in glamor for uploading SHM pixmaps to
    temporary GL memory for accelerating a Composite operation, and most of
    its code is about how you convert formats.  Add a test that runs through
    all the formats, to give us some coverage.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/Makefile.am b/Makefile.am
index 852d174..f77cb4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,6 +16,7 @@ rendercheck_SOURCES = \
 	t_gtk_argb_xbgr.c \
 	t_libreoffice_xrgb.c \
 	t_repeat.c \
+	t_shmblend.c \
 	t_srccoords.c \
 	t_tsrccoords.c \
 	t_tsrccoords2.c \
diff --git a/configure.ac b/configure.ac
index 655a1b6..8ad0b3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-shadow])
 AC_CHECK_HEADERS([err.h])
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(RC, [xrender x11 xproto >= 7.0.17])
+PKG_CHECK_MODULES(RC, [xrender xext x11 xproto >= 7.0.17])
 
 AC_CONFIG_FILES([Makefile
                  man/Makefile])
diff --git a/rendercheck.h b/rendercheck.h
index f0fa7b7..1c392e8 100644
--- a/rendercheck.h
+++ b/rendercheck.h
@@ -24,6 +24,7 @@
 #include <X11/extensions/Xrender.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #if HAVE_ERR_H
 # include <err.h>
@@ -44,6 +45,7 @@ static inline void errx(int eval, const char *fmt, ...) {
 
 #define min(a, b) (a < b ? a : b)
 #define max(a, b) (a > b ? a : b)
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 typedef struct _color4d
 {
@@ -92,6 +94,7 @@ record_result(struct rendercheck_test_result *result, bool success)
 #define TEST_BUG7366		0x1000
 #define TEST_gtk_argb_xbgr	0x2000
 #define TEST_libreoffice_xrgb	0x4000
+#define TEST_shmblend		0x8000
 
 struct rendercheck_test {
 	int bit;
diff --git a/t_shmblend.c b/t_shmblend.c
new file mode 100644
index 0000000..752e17a
--- /dev/null
+++ b/t_shmblend.c
@@ -0,0 +1,245 @@
+/*
+ * Copyright © 2016 Broadcom
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include <inttypes.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include "rendercheck.h"
+#include <X11/extensions/XShm.h>
+
+bool had_x_error;
+static int (*orig_x_error_handler)(Display *, XErrorEvent *);
+
+static int
+shmerrorhandler(Display *d, XErrorEvent *e)
+{
+	had_x_error = true;
+	if (e->error_code == BadAccess) {
+		fprintf(stderr,"failed to attach shared memory\n");
+		return 0;
+	} else {
+		return (*orig_x_error_handler)(d,e);
+	}
+}
+
+static XShmSegmentInfo *
+get_x_shm_info(Display *dpy, size_t size)
+{
+	XShmSegmentInfo *shm_info = calloc(1, sizeof(*shm_info));
+
+	if (!XShmQueryExtension(dpy))
+		return NULL;
+
+	shm_info->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0777);
+	if (shm_info->shmid < 0) {
+		free(shm_info);
+		return NULL;
+	}
+
+	shm_info->shmaddr = shmat(shm_info->shmid, NULL, 0);
+	if (shm_info->shmaddr == (void *)-1) {
+		free(shm_info);
+		return NULL;
+	}
+
+	shm_info->readOnly = false;
+
+	XSync(dpy, true);
+	had_x_error = false;
+	orig_x_error_handler = XSetErrorHandler(shmerrorhandler);
+	XShmAttach(dpy, shm_info);
+	XSync(dpy, true);
+	XSetErrorHandler(orig_x_error_handler);
+
+	return shm_info;
+}
+
+static void
+fill_shm_with_formatted_color(Display *dpy, XShmSegmentInfo *shm_info,
+			      XRenderPictFormat *format,
+			      int w, int h, color4d *color)
+{
+	XImage *image;
+	XRenderDirectFormat *layout = &format->direct;
+	unsigned long r = layout->redMask * color->r;
+	unsigned long g = layout->greenMask * color->g;
+	unsigned long b = layout->blueMask * color->b;
+	unsigned long a = layout->alphaMask * color->a;
+	unsigned long pix;
+
+	r <<= layout->red;
+	g <<= layout->green;
+	b <<= layout->blue;
+	a <<= layout->alpha;
+
+	pix = r | g | b | a;
+
+	image = XShmCreateImage(dpy, NULL, format->depth, ZPixmap,
+				shm_info->shmaddr, shm_info, w, h);
+	for (int y = 0; y < h; y++) {
+		for (int x = 0; x < w; x++) {
+			XPutPixel(image, x, y, pix);
+		}
+	}
+	XDestroyImage(image);
+}
+
+static bool
+test_format(Display *dpy, int op, int w, int h, struct render_format *format)
+{
+	XRenderPictFormat *argb32_format;
+	XShmSegmentInfo *shm_info;
+	Pixmap src_pix = 0, dst_pix;
+	bool pass = true;
+	size_t size = w * h * 4;
+	color4d dst_color = {.25, .25, .25, .25};
+	picture_info src, dst;
+
+	shm_info = get_x_shm_info(dpy, size);
+	if (!shm_info) {
+		pass = false;
+		goto fail;
+	}
+
+	/* Create the SHM pixmap for the source. */
+	src_pix = XShmCreatePixmap(dpy, DefaultRootWindow(dpy),
+				   shm_info->shmaddr, shm_info, w, h,
+				   format->format->depth);
+
+	src.pict = XRenderCreatePicture(dpy, src_pix, format->format, 0, NULL);
+	src.format = format->format;
+
+	/* Make a plain a8r8g8b8 picture for the dst. */
+	argb32_format = XRenderFindStandardFormat(dpy, PictStandardARGB32);
+	dst_pix = XCreatePixmap(dpy, DefaultRootWindow(dpy), w, h,
+				argb32_format->depth);
+	dst.pict = XRenderCreatePicture(dpy, dst_pix, argb32_format, 0, NULL);
+	dst.format = XRenderFindStandardFormat(dpy, PictStandardARGB32);
+
+	for (int i = 0; i < num_colors; i++) {
+		color4d src_color = colors[i];
+		color4d expected;
+		XImage *image;
+		XRenderDirectFormat acc;
+
+		fill_shm_with_formatted_color(dpy, shm_info, format->format,
+					      w, h, &colors[i]);
+
+		argb_fill(dpy, &dst, 0, 0, w, h,
+			  dst_color.a, dst_color.r,
+			  dst_color.g, dst_color.b);
+
+		XRenderComposite(dpy, op,
+				 src.pict, 0, dst.pict,
+				 0, 0,
+				 0, 0,
+				 0, 0,
+				 w, h);
+
+		image = XGetImage(dpy, dst_pix,
+				  0, 0, w, h,
+				  0xffffffff, ZPixmap);
+
+		color_correct(&src, &src_color);
+
+		accuracy(&acc,
+			 &argb32_format->direct,
+			 &format->format->direct);
+
+		do_composite(op, &src_color, NULL, &dst_color, &expected, false);
+
+		for (int j = 0; j < w * h; j++) {
+			int x = j % w;
+			int y = j / h;
+			color4d tested;
+
+			get_pixel_from_image(image, &dst, x, y, &tested);
+
+			if (eval_diff(&acc, &expected, &tested) > 3.) {
+				char testname[30];
+
+				pass = false;
+
+				snprintf(testname, ARRAY_SIZE(testname),
+					 "%s %s SHM blend", ops[op].name,
+					format->name);
+
+				print_fail(testname, &expected, &tested, x, y,
+					   eval_diff(&acc, &expected, &tested));
+				printf("src color: %.2f %.2f %.2f %.2f\n",
+				       src_color.r,
+				       src_color.g,
+				       src_color.b,
+				       src_color.a);
+				printf("dst color: %.2f %.2f %.2f %.2f\n",
+				       dst_color.r,
+				       dst_color.g,
+				       dst_color.b,
+				       dst_color.a);
+
+				break;
+			}
+		}
+
+		XDestroyImage(image);
+	}
+
+	XRenderFreePicture(dpy, src.pict);
+	XRenderFreePicture(dpy, dst.pict);
+	XFreePixmap(dpy, dst_pix);
+fail:
+	if (shm_info) {
+		XFreePixmap(dpy, src_pix);
+		XShmDetach(dpy, shm_info);
+		/* Wait for server to fully detach before removing. */
+		XSync(dpy, False);
+		shmdt(shm_info->shmaddr);
+		shmctl(shm_info->shmid, IPC_RMID, NULL);
+		free(shm_info);
+	}
+
+	return pass;
+}
+
+static struct rendercheck_test_result
+test_shmblend(Display *dpy)
+{
+	struct rendercheck_test_result result = {};
+	int i;
+
+	for (i = 0; i < nformats; i++) {
+		struct render_format *format = &formats[i];
+
+		printf("Beginning SHM blend test from %s\n", format->name);
+
+		record_result(&result, test_format(dpy, PictOpSrc, 8, 8,
+						   format));
+		record_result(&result, test_format(dpy, PictOpOver, 8, 8,
+						   format));
+	}
+
+	return result;
+}
+
+DECLARE_RENDERCHECK_ARG_TEST(shmblend, "SHM Pixmap blending",
+			     test_shmblend);
diff --git a/tests.c b/tests.c
index 730acbf..ff2bbd8 100644
--- a/tests.c
+++ b/tests.c
@@ -229,8 +229,6 @@ argb_fill(Display *dpy, picture_info *p, int x, int y, int w, int h, float a,
 	XRenderFillRectangle(dpy, PictOpSrc, p->pict, &rendercolor, x, y, w, h);
 }
 
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
 /* Create a set of direct format XRenderPictFormats for later use.  This lets
  * us get more formats than just the standard required set, and lets us attach
  * names to them.
commit f0e123add7e8023c6715ce483f94ace2d9a2dc72
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Feb 1 13:48:45 2016 -0800

    Use ELF sections to make test setup easier.
    
    Managing the group logic was really error-prone (forget to edit
    success_mask when copy and pasting?  Forget to printf a description of
    the group?).  Most new tests being written can be described as a single
    call that does a couple subtests.
    
    This doesn't convert all of the tests.  Some of the remaining ones use
    "win" for presenting results (which we may want to just put in a
    global?), and the rest use the pre-created pictures, which would need
    some much bigger refactoring if we want to move their test logic into
    their test files.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/main.c b/main.c
index b5d67cc..4cec99b 100644
--- a/main.c
+++ b/main.c
@@ -121,27 +121,38 @@ struct {
     {TEST_REPEAT, "repeat"},
     {TEST_TRIANGLES, "triangles"},
     {TEST_BUG7366, "bug7366"},
-    {TEST_GTK_ARGB_XBGR, "gtk_argb_xbgr"},
-    {TEST_LIBREOFFICE_XRGB, "libreoffice_xrgb"},
     {0, NULL}
 };
 
+static void
+print_test_separator(int i)
+{
+        if (i % 5 == 0) {
+            if(i != 0)
+                putc('\n', stderr);
+            putc('\t', stderr);
+        } else {
+            fprintf(stderr, ", ");
+        }
+}
+
 void print_tests(FILE *file, int tests) {
     int i, j;
     
     for (i=0, j=0; available_tests[i].name; i++) {
         if (!(available_tests[i].flag & tests))
             continue;
-        if (j % 5 == 0) {
-            if(j != 0)
-                putc('\n', stderr);
-            putc('\t', stderr);
-        } else {
-            fprintf(stderr, ", ");
-        }
+	print_test_separator(j++);
         fprintf(stderr, "%s", available_tests[i].name);
         j++;
     }
+    for_each_test(test) {
+	if (!(test->bit & tests))
+	    continue;
+	print_test_separator(j++);
+        fprintf(stderr, "%s", test->arg_name);
+        j++;
+    }
     if (j)
         fprintf(file, "\n");
 }
@@ -169,7 +180,7 @@ int main(int argc, char **argv)
 	XSetWindowAttributes as;
 	picture_info window;
 	char *display = NULL;
-	char *test, *format, *opname, *nextname;
+	char *test_name, *format, *opname, *nextname;
 
 	static struct option longopts[] = {
 		{ "display",	required_argument,	NULL,	'd' },
@@ -239,15 +250,25 @@ int main(int argc, char **argv)
 			/* disable all tests */
 			enabled_tests = 0;
 
-			while ((test = strsep(&nextname, ",")) != NULL) {
+			while ((test_name = strsep(&nextname, ",")) != NULL) {
 				int i;
+				bool found = false;
 				for(i=0; available_tests[i].name; i++) {
-					if(strcmp(test, available_tests[i].name) == 0) {
+					if(strcmp(test_name, available_tests[i].name) == 0) {
 						enabled_tests |= available_tests[i].flag;
+						found = true;
+						break;
+					}
+				}
+				for_each_test(test) {
+					if (strcmp(test_name,
+						   test->arg_name) == 0) {
+						enabled_tests |= test->bit;
+						found = true;
 						break;
 					}
 				}
-				if(available_tests[i].name == NULL)
+				if (!found)
 					usage(argv[0]);
 			}
 
diff --git a/rendercheck.h b/rendercheck.h
index 2195cb4..f0fa7b7 100644
--- a/rendercheck.h
+++ b/rendercheck.h
@@ -64,6 +64,19 @@ struct op_info {
 	bool disabled;
 };
 
+struct rendercheck_test_result {
+	int tests;
+	int passed;
+};
+
+static inline void
+record_result(struct rendercheck_test_result *result, bool success)
+{
+	result->tests++;
+	if (success)
+		result->passed++;
+}
+
 #define TEST_FILL		0x0001
 #define TEST_DSTCOORDS		0x0002
 #define TEST_SRCCOORDS		0x0004
@@ -77,8 +90,27 @@ struct op_info {
 #define TEST_REPEAT	  	0x0400
 #define TEST_TRIANGLES  	0x0800
 #define TEST_BUG7366		0x1000
-#define TEST_GTK_ARGB_XBGR	0x2000
-#define TEST_LIBREOFFICE_XRGB	0x4000
+#define TEST_gtk_argb_xbgr	0x2000
+#define TEST_libreoffice_xrgb	0x4000
+
+struct rendercheck_test {
+	int bit;
+	const char *arg_name;
+	const char *long_name;
+	struct rendercheck_test_result (*func)(Display *dpy);
+};
+
+#define DECLARE_RENDERCHECK_TEST(name)		  \
+	const struct rendercheck_test test_desc_##name \
+	__attribute__ ((section ("test_section")))
+
+#define DECLARE_RENDERCHECK_ARG_TEST(arg_name_, long_name_, func_)		\
+	DECLARE_RENDERCHECK_TEST(arg_name_) = {				\
+		.bit = TEST_##arg_name_,				\
+		.arg_name = #arg_name_,					\
+		.long_name = long_name_,				\
+		.func = func_,						\
+	}
 
 struct render_format {
 	XRenderPictFormat *format;
@@ -88,6 +120,12 @@ struct render_format {
 extern struct render_format *formats;
 extern int nformats;
 
+/* Storage that will point at the start and end of the ELF section for test
+ * structs.  These are automatically set up by the linker when placing things
+ * in their sections.
+ */
+extern struct rendercheck_test __start_test_section, __stop_test_section;
+
 extern int pixmap_move_iter;
 extern int win_width, win_height;
 extern struct op_info ops[];
@@ -226,8 +264,7 @@ trifan_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 bool
 bug7366_test(Display *dpy);
 
-bool
-gtk_argb_xbgr_test(Display *dpy);
-
-bool
-libreoffice_xrgb_test(Display *dpy, bool invert);
+#define for_each_test(test)						\
+	for (struct rendercheck_test *test = &__start_test_section;	\
+	     test < &__stop_test_section;				\
+	     test++)
diff --git a/t_gtk_argb_xbgr.c b/t_gtk_argb_xbgr.c
index 2b004d5..f19dfea 100644
--- a/t_gtk_argb_xbgr.c
+++ b/t_gtk_argb_xbgr.c
@@ -31,8 +31,8 @@
 #define PIXEL_ABGR	0xff886644
 #define PIXEL_RGB	0x446688
 
-bool
-gtk_argb_xbgr_test(Display *dpy)
+static struct rendercheck_test_result
+test_gtk_argb_xbgr(Display *dpy)
 {
 	int x, y;
 	Pixmap	pix_32;
@@ -46,6 +46,7 @@ gtk_argb_xbgr_test(Display *dpy)
 	XRenderPictFormat	*pic_rgb_format;
 	GC	gc_32;
 	XImage	*image_24, *image_32;
+	struct rendercheck_test_result result = {};
 
 	templ.type = PictTypeDirect;
 	templ.depth = 32;
@@ -95,7 +96,8 @@ gtk_argb_xbgr_test(Display *dpy)
 
 	if (!pic_argb_format || !pic_xbgr_format || !pic_rgb_format) {
 		printf("Couldn't find xBGR and ARGB formats\n");
-		return false;
+		record_result(&result, false);
+		return result;
 	}
 
 	pix_32 = XCreatePixmap(dpy, RootWindow(dpy, DefaultScreen(dpy)),
@@ -141,10 +143,15 @@ gtk_argb_xbgr_test(Display *dpy)
 				printf("fail: pixel value is %08lx "
 				    "should be %08x\n",
 				    pixel, PIXEL_RGB);
-				return false;
+				record_result(&result, false);
+				return result;
 			}
 		}
 	}
 
-	return true;
+	record_result(&result, true);
+	return result;
 }
+
+DECLARE_RENDERCHECK_ARG_TEST(gtk_argb_xbgr, "GTK xRGB/ABGR same picture",
+			     test_gtk_argb_xbgr);
diff --git a/t_libreoffice_xrgb.c b/t_libreoffice_xrgb.c
index 9efca58..1398a01 100644
--- a/t_libreoffice_xrgb.c
+++ b/t_libreoffice_xrgb.c
@@ -39,8 +39,8 @@
 #define PIXEL_ARGB		0xff886644
 #define INVERT_PIXEL_ARGB	0xff7799bb
 
-bool
-libreoffice_xrgb_test(Display *dpy, bool invert)
+static bool
+libreoffice_xrgb_test_one(Display *dpy, bool invert)
 {
 	int x, y;
 	Pixmap	src_pix, dst_pix;
@@ -163,3 +163,17 @@ libreoffice_xrgb_test(Display *dpy, bool invert)
 
 	return true;
 }
+
+static struct rendercheck_test_result
+test_libreoffice_xrgb(Display *dpy)
+{
+	struct rendercheck_test_result result = { };
+
+	record_result(&result, libreoffice_xrgb_test_one(dpy, false));
+	record_result(&result, libreoffice_xrgb_test_one(dpy, true));
+
+	return result;
+}
+
+DECLARE_RENDERCHECK_ARG_TEST(libreoffice_xrgb, "LibreOffice xRGB",
+			     test_libreoffice_xrgb);
diff --git a/tests.c b/tests.c
index 456e778..730acbf 100644
--- a/tests.c
+++ b/tests.c
@@ -462,6 +462,20 @@ do {								\
 	    test_dst[num_test_dst++] = &pictures_solid[i];
 	}
 
+	for_each_test(test) {
+		struct rendercheck_test_result result;
+
+		if (!(enabled_tests & test->bit))
+			continue;
+
+		result = test->func(dpy);
+		tests_total += result.tests;
+		tests_passed += result.passed;
+
+		if (result.tests == result.passed)
+			success_mask |= test->bit;
+	}
+
 	if (enabled_tests & TEST_FILL) {
 		bool ok, group_ok = true;
 
@@ -733,29 +747,6 @@ do {								\
 		success_mask |= TEST_BUG7366;
 	}
 
-        if (enabled_tests & TEST_GTK_ARGB_XBGR) {
-		bool ok, group_ok = true;
-
-		ok = gtk_argb_xbgr_test(dpy);
-		RECORD_RESULTS();
-
-		if (group_ok)
-			success_mask |= TEST_GTK_ARGB_XBGR;
-	}
-
-        if (enabled_tests & TEST_LIBREOFFICE_XRGB) {
-		bool ok, group_ok = true;
-
-		ok = libreoffice_xrgb_test(dpy, false);
-		RECORD_RESULTS();
-
-		ok = libreoffice_xrgb_test(dpy, true);
-		RECORD_RESULTS();
-
-		if (group_ok)
-			success_mask |= TEST_LIBREOFFICE_XRGB;
-	}
-
 	free(test_ops);
 	free(test_src);
 	free(test_mask);
commit db8cdfda4ded5c94c76212e51c1bf903439ce52d
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Feb 1 13:48:44 2016 -0800

    Save the list of active formats in a global for use by tests.
    
    I'd like to move driving of tests out of tests.c and into t_*.c, and
    part of that will be allowing tests to use the formats list.  While I'm
    at it, save the name of the format in the array so it doesn't need to be
    recomputed.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/rendercheck.h b/rendercheck.h
index 55ffcff..2195cb4 100644
--- a/rendercheck.h
+++ b/rendercheck.h
@@ -80,6 +80,14 @@ struct op_info {
 #define TEST_GTK_ARGB_XBGR	0x2000
 #define TEST_LIBREOFFICE_XRGB	0x4000
 
+struct render_format {
+	XRenderPictFormat *format;
+	char *name;
+};
+
+extern struct render_format *formats;
+extern int nformats;
+
 extern int pixmap_move_iter;
 extern int win_width, win_height;
 extern struct op_info ops[];
diff --git a/tests.c b/tests.c
index 62fa34b..456e778 100644
--- a/tests.c
+++ b/tests.c
@@ -27,8 +27,8 @@
 
 #include "rendercheck.h"
 
-static XRenderPictFormat **format_list;
-static int nformats;
+struct render_format *formats;
+int nformats;
 static int argb32index;
 
 /* Note: changing the order of these colors may disrupt tests that depend on
@@ -240,36 +240,35 @@ create_formats_list(Display *dpy)
 {
     int i;
     int nformats_allocated = 5;
-    XRenderPictFormat templ;
+    XRenderPictFormat templ, *format;
 
     memset(&templ, 0, sizeof(templ));
     templ.type = PictTypeDirect;
 
-    format_list = malloc(sizeof(XRenderPictFormat *) * nformats_allocated);
-    if (format_list == NULL)
+    formats = malloc(sizeof(*formats) * nformats_allocated);
+    if (formats == NULL)
 	errx(1, "malloc error");
     nformats = 0;
 
     argb32index = -1;
     for (i = 0; ; i++) {
-	char *name;
 	int alphabits, redbits;
 
 	if (nformats + 1 == nformats_allocated) {
 	    nformats_allocated *= 2;
-	    format_list = realloc(format_list, sizeof(XRenderPictFormat *) *
-		nformats_allocated);
-	    if (format_list == NULL)
+	    formats = realloc(formats, sizeof(*formats) * nformats_allocated);
+	    if (formats == NULL)
 		errx(1, "realloc error");
 	}
 
-	format_list[nformats] = XRenderFindFormat(dpy, PictFormatType, &templ,
-	    i);
-	if (format_list[nformats] == NULL)
-	    break;
+	format = XRenderFindFormat(dpy, PictFormatType, &templ, i);
+	if (!format)
+		break;
 
-	alphabits = bit_count(format_list[nformats]->direct.alphaMask);
-	redbits = bit_count(format_list[nformats]->direct.redMask);
+	formats[nformats].format = format;
+
+	alphabits = bit_count(format->direct.alphaMask);
+	redbits = bit_count(format->direct.redMask);
 
 	/* Our testing code isn't all that hot, so don't bother trying at
 	 * the low depths yet.
@@ -280,31 +279,33 @@ create_formats_list(Display *dpy)
 	    continue;
 	}
 
-	describe_format(&name, NULL, format_list[nformats]);
+	describe_format(&formats[nformats].name, NULL, format);
 
 	if (format_whitelist_len != 0) {
 	    bool ok = false;
 	    int j;
 
 	    for (j = 0; j < format_whitelist_len; j++) {
-		if (strcmp(format_whitelist[j], name) == 0) {
+		if (strcmp(format_whitelist[j], formats[nformats].name) == 0) {
 		    ok = true;
 		    break;
 		}
 	    }
 	    if (!ok) {
-		printf("Ignoring server-supported format: %s\n", name);
+		printf("Ignoring server-supported format: %s\n",
+		       formats[nformats].name);
+		free(formats[nformats].name);
+		formats[nformats].name = NULL;
 		continue;
 	    }
 	}
 
-	if (format_list[nformats] == XRenderFindStandardFormat(dpy,
-	    PictStandardARGB32))
+	if (format == XRenderFindStandardFormat(dpy, PictStandardARGB32))
 	{
 	    argb32index = nformats;
 	}
 
-	printf("Found server-supported format: %s\n", name);
+	printf("Found server-supported format: %s\n", formats[nformats].name);
 
 	nformats++;
     }
@@ -336,7 +337,7 @@ do_tests(Display *dpy, picture_info *win)
 		errx(1, "malloc error");
 
 	for (i = 0; i < num_dests; i++) {
-		dests[i].format = format_list[i];
+		dests[i].format = formats[i].format;
 		dests[i].d = XCreatePixmap(dpy, DefaultRootWindow(dpy),
 		    win_width, win_height, dests[i].format->depth);
 		dests[i].pict = XRenderCreatePicture(dpy, dests[i].d,
@@ -355,7 +356,7 @@ do_tests(Display *dpy, picture_info *win)
 		color4d *c = &colors[i / nformats];
 
 		/* The standard PictFormat numbers go from 0 to 4 */
-		pictures_1x1[i].format = format_list[i % nformats];
+		pictures_1x1[i].format = formats[i % nformats].format;
 		pictures_1x1[i].d = XCreatePixmap(dpy, DefaultRootWindow(dpy),
 		    1, 1, pictures_1x1[i].format->depth);
 		pa.repeat = true;
@@ -385,7 +386,7 @@ do_tests(Display *dpy, picture_info *win)
 		color4d *c = &colors[i / nformats];
 
 		/* The standard PictFormat numbers go from 0 to 4 */
-		pictures_10x10[i].format = format_list[i % nformats];
+		pictures_10x10[i].format = formats[i % nformats].format;
 		pictures_10x10[i].d = XCreatePixmap(dpy, DefaultRootWindow(dpy),
 		    10, 10, pictures_10x10[i].format->depth);
 		pictures_10x10[i].pict = XRenderCreatePicture(dpy,
@@ -423,7 +424,7 @@ do_tests(Display *dpy, picture_info *win)
             c.green = (int)(colors[i].g*65535);
             c.blue = (int)(colors[i].b*65535);
             pictures_solid[i].pict = XRenderCreateSolidFill(dpy, &c);
-            pictures_solid[i].format = format_list[argb32index];
+            pictures_solid[i].format = formats[argb32index].format;
             pictures_solid[i].name = (char *)"Solid";
         }
 
commit c717994102c1e190c0131b57915693b951ed81b7
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Feb 1 13:48:43 2016 -0800

    Start using stdbool.h instead of Xlib or custom bools.
    
    I have a hard time typing anything else at this point.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/main.c b/main.c
index a7035b9..b5d67cc 100644
--- a/main.c
+++ b/main.c
@@ -27,7 +27,7 @@
 #include <strings.h>
 #include <getopt.h>
 
-Bool is_verbose = FALSE, minimalrendering = FALSE;
+bool is_verbose = false, minimalrendering = false;
 int enabled_tests = ~0;		/* Enable all tests by default */
 
 int format_whitelist_len = 0;
@@ -163,7 +163,8 @@ int main(int argc, char **argv)
 	Display *dpy;
 	XEvent ev;
 	int i, o, maj, min;
-	static Bool is_sync = FALSE, print_version = FALSE;
+	static int is_sync = false, print_version = false;
+	static int longopt_minimalrendering = 0;
 	XWindowAttributes a;
 	XSetWindowAttributes as;
 	picture_info window;
@@ -177,10 +178,10 @@ int main(int argc, char **argv)
 		{ "tests",	required_argument,	NULL,	't' },
 		{ "ops",	required_argument,	NULL,	'o' },
 		{ "verbose",	no_argument,		NULL,	'v' },
-		{ "sync",	no_argument,		&is_sync, TRUE},
-		{ "minimalrendering", no_argument,	&minimalrendering,
-		    TRUE},
-		{ "version",	no_argument,		&print_version, TRUE },
+		{ "sync",	no_argument,		&is_sync, true},
+		{ "minimalrendering", no_argument,
+		  &longopt_minimalrendering, true},
+		{ "version",	no_argument,		&print_version, true },
 		{ NULL,		0,			NULL,	0 }
 	};
 
@@ -194,7 +195,7 @@ int main(int argc, char **argv)
 			break;
 		case 'o':
 			for (i = 0; i < num_ops; i++)
-				ops[i].disabled = TRUE;
+				ops[i].disabled = true;
 
 			nextname = optarg;
 			while ((opname = strsep(&nextname, ",")) != NULL) {
@@ -202,7 +203,7 @@ int main(int argc, char **argv)
 					if (strcasecmp(ops[i].name, opname) !=
 					    0)
 						continue;
-					ops[i].disabled = FALSE;
+					ops[i].disabled = false;
 					break;
 				}
 				if (i == num_ops)
@@ -252,7 +253,7 @@ int main(int argc, char **argv)
 
 			break;
 		case 'v':
-			is_verbose = TRUE;
+			is_verbose = true;
 			break;
 		case 0:
 			break;
@@ -262,6 +263,8 @@ int main(int argc, char **argv)
 		}
 	}
 
+	minimalrendering = longopt_minimalrendering;
+
 	/* Print the version string.  Bail out if --version was requested and
 	 * continue otherwise.
 	 */
diff --git a/ops.c b/ops.c
index 0e03550..b7803da 100644
--- a/ops.c
+++ b/ops.c
@@ -210,7 +210,7 @@ do_composite(int op,
 	     const color4d *mask,
 	     const color4d *dst,
 	     color4d *result,
-	     Bool componentAlpha)
+	     bool componentAlpha)
 {
 	color4d srcval, srcalpha;
 
diff --git a/rendercheck.h b/rendercheck.h
index 67efdbf..55ffcff 100644
--- a/rendercheck.h
+++ b/rendercheck.h
@@ -22,6 +22,7 @@
 
 #include <X11/Xlib.h>
 #include <X11/extensions/Xrender.h>
+#include <stdbool.h>
 #include <stdio.h>
 
 #if HAVE_ERR_H
@@ -44,11 +45,6 @@ static inline void errx(int eval, const char *fmt, ...) {
 #define min(a, b) (a < b ? a : b)
 #define max(a, b) (a > b ? a : b)
 
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
 typedef struct _color4d
 {
 	double r, g, b, a;
@@ -65,7 +61,7 @@ typedef struct _picture_info {
 struct op_info {
 	int op;
 	const char *name;
-	Bool disabled;
+	bool disabled;
 };
 
 #define TEST_FILL		0x0001
@@ -87,7 +83,7 @@ struct op_info {
 extern int pixmap_move_iter;
 extern int win_width, win_height;
 extern struct op_info ops[];
-extern Bool is_verbose, minimalrendering;
+extern bool is_verbose, minimalrendering;
 extern color4d colors[];
 extern int enabled_tests;
 extern int format_whitelist_len;
@@ -147,7 +143,7 @@ void
 argb_fill(Display *dpy, picture_info *p, int x, int y, int w, int h, float a,
     float r, float g, float b);
 
-Bool
+bool
 do_tests(Display *dpy, picture_info *win);
 
 void
@@ -161,69 +157,69 @@ do_composite(int op,
 	     const color4d *mask,
 	     const color4d *dst,
 	     color4d *result,
-	     Bool componentAlpha);
+	     bool componentAlpha);
 
 /* The tests */
-Bool
+bool
 blend_test(Display *dpy, picture_info *win, picture_info *dst,
 	   const int *op, int num_op,
 	   const picture_info **src_color, int num_src,
 	   const picture_info **dst_color, int num_dst);
 
-Bool
+bool
 composite_test(Display *dpy, picture_info *win, picture_info *dst,
 	       const int *op, int num_op,
 	       const picture_info **src_color, int num_src,
 	       const picture_info **mask_color, int num_mask,
 	       const picture_info **dst_color, int num_dst,
-	       Bool componentAlpha);
+	       bool componentAlpha);
 
-Bool
+bool
 dstcoords_test(Display *dpy, picture_info *win, int op, picture_info *dst,
     picture_info *bg, picture_info *fg);
 
-Bool
+bool
 fill_test(Display *dpy, picture_info *win, picture_info *src);
 
-Bool
+bool
 srccoords_test(Display *dpy, picture_info *win, picture_info *white,
-    Bool test_mask);
+    bool test_mask);
 
-Bool
+bool
 trans_coords_test(Display *dpy, picture_info *win, picture_info *white,
-    Bool test_mask);
+    bool test_mask);
 
-Bool
+bool
 trans_srccoords_test_2(Display *dpy, picture_info *win, picture_info *white,
-    Bool test_mask);
+    bool test_mask);
 
-Bool render_to_gradient_test(Display *dpy, picture_info *src);
+bool render_to_gradient_test(Display *dpy, picture_info *src);
 
-Bool linear_gradient_test(Display *dpy, picture_info *win,
+bool linear_gradient_test(Display *dpy, picture_info *win,
                           picture_info *dst, int op, picture_info *dst_color);
 
-Bool
+bool
 repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *dst_color, picture_info *c1, picture_info *c2,
-    Bool test_mask);
+    bool test_mask);
 
-Bool
+bool
 triangles_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *src_color, picture_info *dst_color);
 
-Bool
+bool
 tristrip_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *src_color, picture_info *dst_color);
 
-Bool
+bool
 trifan_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *src_color, picture_info *dst_color);
 
-Bool
+bool
 bug7366_test(Display *dpy);
 
-Bool
+bool
 gtk_argb_xbgr_test(Display *dpy);
 
-Bool
-libreoffice_xrgb_test(Display *dpy, Bool invert);
+bool
+libreoffice_xrgb_test(Display *dpy, bool invert);
diff --git a/t_blend.c b/t_blend.c
index b436fe4..2d761ce 100644
--- a/t_blend.c
+++ b/t_blend.c
@@ -26,7 +26,7 @@
 #include "rendercheck.h"
 
 /* Test a composite of a given operation, source, and destination picture.  */
-Bool
+bool
 blend_test(Display *dpy, picture_info *win, picture_info *dst,
 	   const int *op, int num_op,
 	   const picture_info **src_color, int num_src,
@@ -106,7 +106,7 @@ blend_test(Display *dpy, picture_info *win, picture_info *dst,
 							 NULL,
 							 &tdst,
 							 &expected,
-							 FALSE);
+							 false);
 					    color_correct(dst, &expected);
 
 					    if (eval_diff(&acc, &expected, &tested) > 3.) {
@@ -127,7 +127,7 @@ blend_test(Display *dpy, picture_info *win, picture_info *dst,
 							   dst_color[k]->color.a);
 						    printf("src: %s, dst: %s\n", src_color[j]->name, dst->name);
 						    free(srcformat);
-						    return FALSE;
+						    return false;
 					    }
 				    }
 				    y++;
@@ -139,5 +139,5 @@ blend_test(Display *dpy, picture_info *win, picture_info *dst,
 	    }
 	}
 
-	return TRUE;
+	return true;
 }
diff --git a/t_bug7366.c b/t_bug7366.c
index 34ac004..8e06629 100644
--- a/t_bug7366.c
+++ b/t_bug7366.c
@@ -29,13 +29,13 @@
 static int
 expecting_error(Display *dpy, XErrorEvent *event)
 {
-    return TRUE;
+    return true;
 }
 
 /**
  * Check SetPictureTransform on a source picture causing a crash.
  */
-static Bool
+static bool
 bug7366_test_set_picture_transform(Display *dpy)
 {
     Picture source_pict;
@@ -48,17 +48,17 @@ bug7366_test_set_picture_transform(Display *dpy)
     memset(&transform, 0, sizeof(transform));
     XRenderSetPictureTransform(dpy, source_pict, &transform);
 
-    XSync(dpy, FALSE);
+    XSync(dpy, false);
 
     XRenderFreePicture(dpy, source_pict);
 
-    return TRUE;
+    return true;
 }
 
 /**
  * Check setting of AlphaMap to a source picture causing a crash.
  */
-static Bool
+static bool
 bug7366_test_set_alpha_map(Display *dpy)
 {
     Picture source_pict, pict;
@@ -76,20 +76,20 @@ bug7366_test_set_alpha_map(Display *dpy)
     XSetErrorHandler(expecting_error);
     pa.alpha_map = source_pict;
     XRenderChangePicture(dpy, pict, CPAlphaMap, &pa);
-    XSync(dpy, FALSE);
+    XSync(dpy, false);
     XSetErrorHandler(NULL);
 
     XFreePixmap(dpy, pixmap);
     XRenderFreePicture(dpy, pict);
     XRenderFreePicture(dpy, source_pict);
 
-    return TRUE;
+    return true;
 }
 
 /**
  * Check SetPictureClipRectangles on a source potentially causing a crash.
  */
-static Bool
+static bool
 bug7366_test_set_picture_clip_rectangles(Display *dpy)
 {
     Picture source_pict;
@@ -102,18 +102,18 @@ bug7366_test_set_picture_clip_rectangles(Display *dpy)
     memset(&rectangle, 0, sizeof(rectangle));
     XSetErrorHandler(expecting_error);
     XRenderSetPictureClipRectangles(dpy, source_pict, 0, 0, &rectangle, 1);
-    XSync(dpy, FALSE);
+    XSync(dpy, false);
     XSetErrorHandler(NULL);
 
     XRenderFreePicture(dpy, source_pict);
 
-    return TRUE;
+    return true;
 }
 
 /**
  * Check SetPictureFilter on a source potentially causing a crash.
  */
-static Bool
+static bool
 bug7366_test_set_picture_filter(Display *dpy)
 {
     Picture source_pict;
@@ -123,15 +123,15 @@ bug7366_test_set_picture_filter(Display *dpy)
     source_pict = XRenderCreateSolidFill(dpy, &color);
 
     XRenderSetPictureFilter(dpy, source_pict, "bilinear", NULL, 0);
-    XSync(dpy, FALSE);
+    XSync(dpy, false);
     XSetErrorHandler(NULL);
 
     XRenderFreePicture(dpy, source_pict);
 
-    return TRUE;
+    return true;
 }
 
-Bool
+bool
 bug7366_test(Display *dpy)
 {
     int maj, min;
@@ -139,7 +139,7 @@ bug7366_test(Display *dpy)
     /* Make sure we actually have gradients available */
     XRenderQueryVersion(dpy, &maj, &min);
     if (maj != 0 || min < 10)
-	return TRUE;
+	return true;
 
     bug7366_test_set_picture_transform(dpy);
     bug7366_test_set_alpha_map(dpy);
@@ -147,5 +147,5 @@ bug7366_test(Display *dpy)
     bug7366_test_set_picture_filter(dpy);
 
     /* If the server isn't gone, then we've succeeded. */
-    return TRUE;
+    return true;
 }
diff --git a/t_composite.c b/t_composite.c
index 73133db..eec0033 100644
--- a/t_composite.c
+++ b/t_composite.c
@@ -27,13 +27,13 @@
 /* Test a composite of a given operation, source, mask, and destination picture.
  * Fills the window, and samples from the 0,0 pixel corner.
  */
-Bool
+bool
 composite_test(Display *dpy, picture_info *win, picture_info *dst,
 	       const int *op, int num_op,
 	       const picture_info **src_color, int num_src,
 	       const picture_info **mask_color, int num_mask,
 	       const picture_info **dst_color, int num_dst,
-	       Bool componentAlpha)
+	       bool componentAlpha)
 {
 	color4d expected, tested, tdst, tmsk;
 	char testname[40];
@@ -59,7 +59,7 @@ composite_test(Display *dpy, picture_info *win, picture_info *dst,
 		if (componentAlpha) {
 		    XRenderPictureAttributes pa;
 
-		    pa.component_alpha = TRUE;
+		    pa.component_alpha = true;
 		    XRenderChangePicture(dpy, mask_color[m]->pict,
 					 CPComponentAlpha, &pa);
 		}
@@ -90,7 +90,7 @@ composite_test(Display *dpy, picture_info *win, picture_info *dst,
 		    if (componentAlpha) {
 			XRenderPictureAttributes pa;
 
-			pa.component_alpha = FALSE;
+			pa.component_alpha = false;
 			XRenderChangePicture(dpy, mask_color[m]->pict,
 					     CPComponentAlpha, &pa);
 		    }
@@ -157,7 +157,7 @@ composite_test(Display *dpy, picture_info *win, picture_info *dst,
 				       mask_color[m]->name,
 				       dst->name);
 				XDestroyImage(image);
-				return FALSE;
+				return false;
 			    }
 			}
 		    }
@@ -167,5 +167,5 @@ composite_test(Display *dpy, picture_info *win, picture_info *dst,
 	    }
 	}
 
-	return TRUE;
+	return true;
 }
diff --git a/t_dstcoords.c b/t_dstcoords.c
index 8944dec..bb8bd7d 100644
--- a/t_dstcoords.c
+++ b/t_dstcoords.c
@@ -33,14 +33,14 @@
  * Otherwise, we're likely to hit a path that maps PictOpOver -> PictOpSrc,
  * for example.
  */
-Bool
+bool
 dstcoords_test(Display *dpy, picture_info *win, int op, picture_info *dst,
     picture_info *bg, picture_info *fg)
 {
 	color4d expected, tested;
 	XImage *image;
 	int x, y, i;
-	Bool failed = FALSE;
+	bool failed = false;
 
 	for (i = 0; i < pixmap_move_iter; i++) {
 		XRenderComposite(dpy, PictOpSrc, bg->pict, 0, dst->pict, 0, 0,
@@ -68,7 +68,7 @@ dstcoords_test(Display *dpy, picture_info *win, int op, picture_info *dst,
 			    print_fail("dst coords",
 				       &expected, &tested, x, y,
 				       eval_diff(&dst->format->direct, &expected, &tested));
-				failed = TRUE;
+				failed = true;
 			}
 		}
 	}
diff --git a/t_fill.c b/t_fill.c
index 7e071c0..4d9f639 100644
--- a/t_fill.c
+++ b/t_fill.c
@@ -29,7 +29,7 @@
 /* Test that filling of the 1x1 repeating pictures worked as expected.  This is
  * pretty basic to most of the tests.
  */
-Bool
+bool
 fill_test(Display *dpy, picture_info *win, picture_info *src)
 {
 	color4d tested;
@@ -43,8 +43,8 @@ fill_test(Display *dpy, picture_info *win, picture_info *src)
 	    print_fail(name, &src->color, &tested, 0, 0,
 		       eval_diff(&src->format->direct, &src->color, &tested));
 	    free(name);
-	    return FALSE;
+	    return false;
 	}
 
-	return TRUE;
+	return true;
 }
diff --git a/t_gradient.c b/t_gradient.c
index 32df8c4..a489fe2 100644
--- a/t_gradient.c
+++ b/t_gradient.c
@@ -85,20 +85,20 @@ static const pixel test_pixels [] = {
 
 static const int n_linear_gradient_points = sizeof(linear_gradient_points)/(2*sizeof(point));
 
-static Bool got_bad_drawable;
+static bool got_bad_drawable;
 
 static int expecting_bad_drawable(Display *dpy, XErrorEvent *event)
 {
 	if (event->error_code == BadDrawable)
-		got_bad_drawable = TRUE;
+		got_bad_drawable = true;
 
-	return TRUE;
+	return true;
 }
 
 
 /* Tests that rendering to a linear gradient returns an error as expected.
  */
-Bool
+bool
 render_to_gradient_test(Display *dpy, picture_info *src)
 {
 	XLinearGradient g;
@@ -124,39 +124,39 @@ render_to_gradient_test(Display *dpy, picture_info *src)
 	gradient = XRenderCreateLinearGradient(dpy, &g, stops, colors, i);
 
 	/* Clear out any failing requests before our expected to fail ones. */
-	XSync(dpy, FALSE);
+	XSync(dpy, false);
 
-	got_bad_drawable = FALSE;
+	got_bad_drawable = false;
 	XSetErrorHandler(expecting_bad_drawable);
 
 	/* Try a real compositing path */
 	XRenderComposite(dpy, PictOpOver, src->pict, 0, gradient,
 			 0, 0, 0, 0, 0, 0, win_width, win_height);
-	XSync(dpy, FALSE);
+	XSync(dpy, false);
 	if (!got_bad_drawable) {
 		printf("render_to_gradient: Failed to get BadDrawable with "
 		       "Over\n");
-		return FALSE;
+		return false;
 	} else {
-		got_bad_drawable = FALSE;
+		got_bad_drawable = false;
 	}
 
 	/* Try the copy path to catch bad short-circuiting to 2d. */
 	XRenderComposite(dpy, PictOpSrc, src->pict, 0, gradient,
 			 0, 0, 0, 0, 0, 0, win_width, win_height);
-	XSync(dpy, FALSE);
+	XSync(dpy, false);
 	if (!got_bad_drawable) {
 		printf("render_to_gradient: Failed to get BadDrawable with "
 		       "Src\n");
-		return FALSE;
+		return false;
 	} else {
-		got_bad_drawable = FALSE;
+		got_bad_drawable = false;
 	}
 	XSetErrorHandler(NULL);
 
 	XRenderFreePicture(dpy, gradient);
 
-	return TRUE;
+	return true;
 }
 
 static void gradientPixel(const stop *stops, double pos, unsigned int spread, color4d *result)
@@ -247,14 +247,14 @@ static void calculate_linear_gradient_color(int x, int y,
 
 
 
-Bool linear_gradient_test(Display *dpy, picture_info *win,
+bool linear_gradient_test(Display *dpy, picture_info *win,
                           picture_info *dst, int op, picture_info *dst_color)
 {
     color4d expected, tested, tdst, tgradient;
     int i, s, p, repeat;
     Picture gradient;
     char testname[40];
-    Bool success = True;
+    bool success = true;
 
     for (s = 0; s < n_stop_list; ++s) {
         for (p = 0; p < n_linear_gradient_points; p += 2) {
@@ -321,7 +321,7 @@ Bool linear_gradient_test(Display *dpy, picture_info *win,
                                tgradient.b, tgradient.a,
                                dst_color->color.r, dst_color->color.g,
                                dst_color->color.b, dst_color->color.a);
-                        success = FALSE;
+                        success = false;
                     } else if (is_verbose) {
                         printf("src: %d/%d, dst: %s\n", s, p, dst->name);
                     }
diff --git a/t_gtk_argb_xbgr.c b/t_gtk_argb_xbgr.c
index b80e58b..2b004d5 100644
--- a/t_gtk_argb_xbgr.c
+++ b/t_gtk_argb_xbgr.c
@@ -31,7 +31,7 @@
 #define PIXEL_ABGR	0xff886644
 #define PIXEL_RGB	0x446688
 
-Bool
+bool
 gtk_argb_xbgr_test(Display *dpy)
 {
 	int x, y;
@@ -95,7 +95,7 @@ gtk_argb_xbgr_test(Display *dpy)
 
 	if (!pic_argb_format || !pic_xbgr_format || !pic_rgb_format) {
 		printf("Couldn't find xBGR and ARGB formats\n");
-		return FALSE;
+		return false;
 	}
 
 	pix_32 = XCreatePixmap(dpy, RootWindow(dpy, DefaultScreen(dpy)),
@@ -141,10 +141,10 @@ gtk_argb_xbgr_test(Display *dpy)
 				printf("fail: pixel value is %08lx "
 				    "should be %08x\n",
 				    pixel, PIXEL_RGB);
-				return FALSE;
+				return false;
 			}
 		}
 	}
 
-	return TRUE;
+	return true;
 }
diff --git a/t_libreoffice_xrgb.c b/t_libreoffice_xrgb.c
index 7f79444..9efca58 100644
--- a/t_libreoffice_xrgb.c
+++ b/t_libreoffice_xrgb.c
@@ -39,8 +39,8 @@
 #define PIXEL_ARGB		0xff886644
 #define INVERT_PIXEL_ARGB	0xff7799bb
 
-Bool
-libreoffice_xrgb_test(Display *dpy, Bool invert)
+bool
+libreoffice_xrgb_test(Display *dpy, bool invert)
 {
 	int x, y;
 	Pixmap	src_pix, dst_pix;
@@ -100,7 +100,7 @@ libreoffice_xrgb_test(Display *dpy, Bool invert)
 
 	if (!pic_argb_format || !pic_xrgb_format || !pic_rgb_format) {
 		printf("Couldn't find xRGB and ARGB formats\n");
-		return FALSE;
+		return false;
 	}
 
 	src_pix = XCreatePixmap(dpy, RootWindow(dpy, DefaultScreen(dpy)),
@@ -155,11 +155,11 @@ libreoffice_xrgb_test(Display *dpy, Bool invert)
 				printf("fail: pixel value is %08lx, "
 				       "should be %08lx\n",
 				       pixel, expected);
-				return FALSE;
+				return false;
 			}
 		}
 	}
 	XDestroyImage(image);
 
-	return TRUE;
+	return true;
 }
diff --git a/t_repeat.c b/t_repeat.c
index 0c25b60..36e69e1 100644
--- a/t_repeat.c
+++ b/t_repeat.c
@@ -45,9 +45,9 @@ static const int sizes[] = {1, 2, 4, 8, 10, 16, 20, 32, 64, 100};
  * test_mask is set, the repeating picture is used as a component-alpha mask,
  * with argb32white as the source.
  */
-Bool
+bool
 repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
-    picture_info *dst_color, picture_info *c1, picture_info *c2, Bool test_mask)
+    picture_info *dst_color, picture_info *c1, picture_info *c2, bool test_mask)
 {
 	unsigned int wi, hi;
 
@@ -64,10 +64,10 @@ repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 		XRenderPictureAttributes pa;
 		XRenderDirectFormat acc;
 		XImage *image;
-		Bool failed = FALSE;
+		bool failed = false;
 
 		pa.component_alpha = test_mask;
-		pa.repeat = TRUE;
+		pa.repeat = true;
 
 		src.d = XCreatePixmap(dpy, DefaultRootWindow(dpy), w, h, 32);
 		src.format = XRenderFindStandardFormat(dpy, PictStandardARGB32);
@@ -118,14 +118,14 @@ repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 
 		if (!test_mask) {
 			do_composite(ops[op].op, &c1->color, NULL, &tdst,
-			    &c1expected, FALSE);
+			    &c1expected, false);
 			do_composite(ops[op].op, &c2->color, NULL, &tdst,
-			    &c2expected, FALSE);
+			    &c2expected, false);
 		} else {
 			do_composite(ops[op].op, &argb32white->color,
-			    &c1->color, &tdst, &c1expected, TRUE);
+			    &c1->color, &tdst, &c1expected, true);
 			do_composite(ops[op].op, &argb32white->color,
-			    &c2->color, &tdst, &c2expected, TRUE);
+			    &c2->color, &tdst, &c2expected, true);
 		}
 		color_correct(dst, &c1expected);
 		color_correct(dst, &c2expected);
@@ -154,7 +154,7 @@ repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 			    print_fail(name, expected, &tested, x, y,
 				       eval_diff(&acc, expected, &tested));
 
-			    failed = TRUE;
+			    failed = true;
 			    goto out;
 			}
 		    }
@@ -165,8 +165,8 @@ out:
 		XFreePixmap(dpy, src.d);
 
 		if (failed)
-		    return FALSE;
+		    return false;
 	    }
 	}
-	return TRUE;
+	return true;
 }
diff --git a/t_srccoords.c b/t_srccoords.c
index 1eae7d8..c498468 100644
--- a/t_srccoords.c
+++ b/t_srccoords.c
@@ -72,21 +72,21 @@ static void destroy_target_picture(Display *dpy, picture_info *p)
  * !test_mask case, to avoid getting CopyArea acceleration (easy to implement)
  * rather than a more general Composite implementation.
  */
-Bool
+bool
 srccoords_test(Display *dpy, picture_info *win, picture_info *white,
-    Bool test_mask)
+    bool test_mask)
 {
 	color4d expected, tested;
 	int i;
 	XRenderPictureAttributes pa;
-	Bool failed = FALSE;
+	bool failed = false;
 	int tested_colors[5][5];
 	picture_info *src;
 
 	src = create_target_picture(dpy);
 	if (src == NULL) {
 		fprintf(stderr, "couldn't allocate picture for test\n");
-		return FALSE;
+		return false;
 	}
 
 	for (i = 0; i < 25; i++) {
@@ -100,12 +100,12 @@ srccoords_test(Display *dpy, picture_info *win, picture_info *white,
 			 * alpha, the mask color should be written to the
 			 * destination.
 			 */
-			pa.component_alpha = TRUE;
+			pa.component_alpha = true;
 			XRenderChangePicture(dpy, src->pict, CPComponentAlpha,
 			    &pa);
 			XRenderComposite(dpy, PictOpSrc, white->pict, src->pict,
 			    win->pict, 0, 0, x, y, 0, 0, 1, 1);
-			pa.component_alpha = FALSE;
+			pa.component_alpha = false;
 			XRenderChangePicture(dpy, src->pict, CPComponentAlpha,
 			    &pa);
 		}
@@ -126,7 +126,7 @@ srccoords_test(Display *dpy, picture_info *win, picture_info *white,
 		    print_fail(test_mask ? "mask coords" : "src coords",
 			       &expected, &tested, x, y,
 			       eval_diff(&win->format->direct, &expected, &tested));
-		    failed = TRUE;
+		    failed = true;
 		}
 	}
 	if (failed) {
diff --git a/t_triangles.c b/t_triangles.c
index 960d21a..05f98d8 100644
--- a/t_triangles.c
+++ b/t_triangles.c
@@ -60,14 +60,14 @@ get_dest_color (int op, color4d *in, color4d *out)
  * probably (nobody has used them yet), but we can trivially test by filling
  * doing two triangles that will exactly cover the rectangle from 2,2 to 4,4.
  */
-Bool
+bool
 triangles_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *src_color, picture_info *dst_color)
 {
 	XTriangle triangles[2];
 	color4d tdst, tsrc;
 	int x, y;
-	Bool success = TRUE;
+	bool success = true;
 	XImage *image;
 
 	triangles[0].p1.x = XDoubleToFixed(2);
@@ -98,7 +98,7 @@ triangles_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 	color_correct(dst, &tdst);
 
 	/* Color expected inside of the triangles */
-	do_composite(ops[op].op, &src_color->color, NULL, &dst_color->color, &tsrc, FALSE);
+	do_composite(ops[op].op, &src_color->color, NULL, &dst_color->color, &tsrc, false);
 	color_correct(dst, &tsrc);
 
 	image = XGetImage(dpy, dst->d,
@@ -120,7 +120,7 @@ triangles_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 		if (eval_diff(&dst->format->direct, &expected, &tested) > 2.) {
 		    print_fail("triangles", &expected, &tested, x, y,
 			       eval_diff(&dst->format->direct, &expected, &tested));
-		    success = FALSE;
+		    success = false;
 		}
 	    }
 	}
@@ -137,14 +137,14 @@ triangles_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 	return success;
 }
 
-Bool
+bool
 trifan_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *src_color, picture_info *dst_color)
 {
 	XPointFixed points[4];
 	color4d tdst, tsrc;
 	int x, y;
-	Bool success = TRUE;
+	bool success = true;
 	XImage *image;
 
 	points[0].x = XDoubleToFixed(2);
@@ -170,7 +170,7 @@ trifan_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 	color_correct(dst, &tdst);
 
 	/* Color expected inside of the triangles */
-	do_composite(ops[op].op, &src_color->color, NULL, &dst_color->color, &tsrc, FALSE);
+	do_composite(ops[op].op, &src_color->color, NULL, &dst_color->color, &tsrc, false);
 	color_correct(dst, &tsrc);
 
 	image = XGetImage(dpy, dst->d,
@@ -192,7 +192,7 @@ trifan_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 		if (eval_diff(&dst->format->direct, &expected, &tested) > 2.) {
 			print_fail("triangles", &expected, &tested, x,y,
 				   eval_diff(&dst->format->direct, &expected, &tested));
-			success = FALSE;
+			success = false;
 		}
 	    }
 	}
@@ -209,14 +209,14 @@ trifan_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 	return success;
 }
 
-Bool
+bool
 tristrip_test(Display *dpy, picture_info *win, picture_info *dst, int op,
     picture_info *src_color, picture_info *dst_color)
 {
 	XPointFixed points[4];
 	color4d tdst, tsrc;
 	int x, y;
-	Bool success = TRUE;
+	bool success = true;
 	XImage *image;
 
 	points[0].x = XDoubleToFixed(2);
@@ -242,7 +242,7 @@ tristrip_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 	color_correct(dst, &tdst);
 
 	/* Color expected inside of the triangles */
-	do_composite(ops[op].op, &src_color->color, NULL, &dst_color->color, &tsrc, FALSE);
+	do_composite(ops[op].op, &src_color->color, NULL, &dst_color->color, &tsrc, false);
 	color_correct(dst, &tsrc);
 
 	image = XGetImage(dpy, dst->d,
@@ -264,7 +264,7 @@ tristrip_test(Display *dpy, picture_info *win, picture_info *dst, int op,
 		if (eval_diff(&dst->format->direct, &expected, &tested) > 2.) {
 		    print_fail("triangles", &expected, &tested, x, y,
 			       eval_diff(&dst->format->direct, &expected, &tested));
-		    success = FALSE;
+		    success = false;
 		}
 	    }
 	}
diff --git a/t_tsrccoords.c b/t_tsrccoords.c
index b931c4a..7d6550e 100644
--- a/t_tsrccoords.c
+++ b/t_tsrccoords.c
@@ -77,12 +77,12 @@ static void init_transform (XTransform *t)
 
 /* Test drawing a 5x5 source image scaled 8x, as either a source or mask.
  */
-Bool
+bool
 trans_coords_test(Display *dpy, picture_info *win, picture_info *white,
-    Bool test_mask)
+    bool test_mask)
 {
 	color4d tested;
-	Bool failed = FALSE;
+	bool failed = false;
 	int tested_colors[TEST_HEIGHT][TEST_WIDTH], expected_colors[TEST_HEIGHT][TEST_WIDTH];
 	XTransform t;
 	picture_info *src;
@@ -94,13 +94,13 @@ trans_coords_test(Display *dpy, picture_info *win, picture_info *white,
 	 * yet.
 	 */
 	if (win->format->type == PictTypeIndexed) {
-		return TRUE;
+		return true;
 	}
 
 	src = create_dot_picture(dpy);
 	if (src == NULL) {
 		fprintf(stderr, "couldn't allocate picture for test\n");
-		return FALSE;
+		return false;
 	}
 
 	init_transform(&t);
@@ -139,7 +139,7 @@ trans_coords_test(Display *dpy, picture_info *win, picture_info *white,
 			tested_colors[y][x] = 9;
 		}
 		if (tested_colors[y][x] != expected_colors[y][x])
-			failed = TRUE;
+			failed = true;
 	    }
 	}
 
diff --git a/t_tsrccoords2.c b/t_tsrccoords2.c
index b083577..af593aa 100644
--- a/t_tsrccoords2.c
+++ b/t_tsrccoords2.c
@@ -70,14 +70,14 @@ static void destroy_target_picture(Display *dpy, picture_info *p)
 /* Test source or mask coordinates by drawing from a 5x5 picture into the 0,0
  * pixel, rotated 90 degrees to the left.
  */
-Bool
+bool
 trans_srccoords_test_2(Display *dpy, picture_info *win, picture_info *white,
-    Bool test_mask)
+    bool test_mask)
 {
 	color4d expected, tested;
 	int i;
 	XRenderPictureAttributes pa;
-	Bool failed = FALSE;
+	bool failed = false;
 	int tested_colors[5][5];
 	picture_info *src;
 	XTransform t;
@@ -86,7 +86,7 @@ trans_srccoords_test_2(Display *dpy, picture_info *win, picture_info *white,
 	src = create_target_picture(dpy);
 	if (src == NULL) {
 		fprintf(stderr, "couldn't allocate picture for test\n");
-		return FALSE;
+		return false;
 	}
 
 	/* Transform that rotates right from the destination coords to the
@@ -111,12 +111,12 @@ trans_srccoords_test_2(Display *dpy, picture_info *win, picture_info *white,
 		 * alpha, the mask color should be written to the
 		 * destination.
 		 */
-		pa.component_alpha = TRUE;
+		pa.component_alpha = true;
 		XRenderChangePicture(dpy, src->pict, CPComponentAlpha,
 		    &pa);
 		XRenderComposite(dpy, PictOpSrc, white->pict, src->pict,
 		    win->pict, 0, 0, 0, 0, 0, 0, 5, 5);
-		pa.component_alpha = FALSE;
+		pa.component_alpha = false;
 		XRenderChangePicture(dpy, src->pict, CPComponentAlpha,
 		    &pa);
 	}
@@ -150,7 +150,7 @@ trans_srccoords_test_2(Display *dpy, picture_info *win, picture_info *white,
 		    print_fail(test_mask ? "mask coords" : "src coords",
 			       &expected, &tested, x, y,
 			       eval_diff(&win->format->direct, &expected, &tested));
-			failed = TRUE;
+			failed = true;
 		}
 	}
 	if (failed) {
diff --git a/tests.c b/tests.c
index f452b3d..62fa34b 100644
--- a/tests.c
+++ b/tests.c
@@ -283,12 +283,12 @@ create_formats_list(Display *dpy)
 	describe_format(&name, NULL, format_list[nformats]);
 
 	if (format_whitelist_len != 0) {
-	    Bool ok = FALSE;
+	    bool ok = false;
 	    int j;
 
 	    for (j = 0; j < format_whitelist_len; j++) {
 		if (strcmp(format_whitelist[j], name) == 0) {
-		    ok = TRUE;
+		    ok = true;
 		    break;
 		}
 	    }
@@ -313,7 +313,7 @@ create_formats_list(Display *dpy)
     }
 }
 
-Bool
+bool
 do_tests(Display *dpy, picture_info *win)
 {
 	int i, j, src;
@@ -358,7 +358,7 @@ do_tests(Display *dpy, picture_info *win)
 		pictures_1x1[i].format = format_list[i % nformats];
 		pictures_1x1[i].d = XCreatePixmap(dpy, DefaultRootWindow(dpy),
 		    1, 1, pictures_1x1[i].format->depth);
-		pa.repeat = TRUE;
+		pa.repeat = true;
 		pictures_1x1[i].pict = XRenderCreatePicture(dpy,
 		    pictures_1x1[i].d, pictures_1x1[i].format, CPRepeat, &pa);
 
@@ -462,7 +462,7 @@ do {								\
 	}
 
 	if (enabled_tests & TEST_FILL) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		printf("Beginning testing of filling of 1x1R pictures\n");
 		for (i = 0; i < num_tests; i++) {
@@ -480,7 +480,7 @@ do {								\
 	}
 
 	if (enabled_tests & TEST_DSTCOORDS) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		printf("Beginning dest coords test\n");
 		for (i = 0; i < 2; i++) {
@@ -494,48 +494,48 @@ do {								\
 	}
 
 	if (enabled_tests & TEST_SRCCOORDS) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		printf("Beginning src coords test\n");
-		ok = srccoords_test(dpy, win, argb32white, FALSE);
+		ok = srccoords_test(dpy, win, argb32white, false);
 		RECORD_RESULTS();
 		if (group_ok)
 			success_mask |= TEST_SRCCOORDS;
 	}
 
 	if (enabled_tests & TEST_MASKCOORDS) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		printf("Beginning mask coords test\n");
-		ok = srccoords_test(dpy, win, argb32white, TRUE);
+		ok = srccoords_test(dpy, win, argb32white, true);
 		RECORD_RESULTS();
 		if (group_ok)
 			success_mask |= TEST_MASKCOORDS;
 	}
 
 	if (enabled_tests & TEST_TSRCCOORDS) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		printf("Beginning transformed src coords test\n");
-		ok = trans_coords_test(dpy, win, argb32white, FALSE);
+		ok = trans_coords_test(dpy, win, argb32white, false);
 		RECORD_RESULTS();
 
 		printf("Beginning transformed src coords test 2\n");
-		ok = trans_srccoords_test_2(dpy, win, argb32white, FALSE);
+		ok = trans_srccoords_test_2(dpy, win, argb32white, false);
 		RECORD_RESULTS();
 		if (group_ok)
 			success_mask |= TEST_TSRCCOORDS;
 	}
 
 	if (enabled_tests & TEST_TMASKCOORDS) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		printf("Beginning transformed mask coords test\n");
-		ok = trans_coords_test(dpy, win, argb32white, TRUE);
+		ok = trans_coords_test(dpy, win, argb32white, true);
 		RECORD_RESULTS();
 
 		printf("Beginning transformed mask coords test 2\n");
-		ok = trans_srccoords_test_2(dpy, win, argb32white, TRUE);
+		ok = trans_srccoords_test_2(dpy, win, argb32white, true);
 		RECORD_RESULTS();
 
 		if (group_ok)
@@ -543,7 +543,7 @@ do {								\
 	}
 
 	if (enabled_tests & TEST_BLEND) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		for (j = 0; j <= num_dests; j++) {
 		    picture_info *pi;
@@ -566,7 +566,7 @@ do {								\
 	}
 
 	if (enabled_tests & TEST_COMPOSITE) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		for (j = 0; j <= num_dests; j++) {
 		    picture_info *pi;
@@ -583,7 +583,7 @@ do {								\
 					test_src, num_test_src,
 					test_mask, num_test_mask,
 					test_dst, num_test_dst,
-					FALSE);
+					false);
 		    RECORD_RESULTS();
 		}
 		if (group_ok)
@@ -591,7 +591,7 @@ do {								\
 	}
 
 	if (enabled_tests & TEST_CACOMPOSITE) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		for (j = 0; j <= num_dests; j++) {
 		    picture_info *pi;
@@ -608,7 +608,7 @@ do {								\
 					test_src, num_test_src,
 					test_mask, num_test_mask,
 					test_dst, num_test_dst,
-					TRUE);
+					true);
 		    RECORD_RESULTS();
 		}
 		if (group_ok)
@@ -616,7 +616,7 @@ do {								\
 	}
 
         if (enabled_tests & TEST_GRADIENTS) {
-	    Bool ok, group_ok = TRUE;
+	    bool ok, group_ok = true;
 
 	    printf("Beginning render to linear gradient test\n");
 	    ok = render_to_gradient_test(dpy, &pictures_1x1[0]);
@@ -648,7 +648,7 @@ do {								\
         }
 
         if (enabled_tests & TEST_REPEAT) {
-	    Bool ok, group_ok = TRUE;
+	    bool ok, group_ok = true;
 
             for (i = 0; i < num_ops; i++) {
 		if (ops[i].disabled)
@@ -667,7 +667,7 @@ do {								\
 		     * consisting of colors 1 and 2 (r, g).
 		     */
 		    ok = repeat_test(dpy, win, pi, i, argb32white, argb32red,
-		        argb32green, FALSE);
+		        argb32green, false);
 		    RECORD_RESULTS();
 
                     printf("Beginning %s mask repeat test on %s\n",
@@ -676,7 +676,7 @@ do {								\
 		     * repeating mask consisting of colors 1 and 2 (r, g).
 		     */
 		    ok = repeat_test(dpy, win, pi, i, argb32white, argb32red,
-		        argb32green, TRUE);
+		        argb32green, true);
 		    RECORD_RESULTS();
                 }
             }
@@ -685,7 +685,7 @@ do {								\
         }
 
 	if (enabled_tests & TEST_TRIANGLES) {
-	    Bool ok, group_ok = TRUE;
+	    bool ok, group_ok = true;
 
 	    for (i = 0; i < num_ops; i++) {
 		if (ops[i].disabled)
@@ -723,7 +723,7 @@ do {								\
 	}
 
         if (enabled_tests & TEST_BUG7366) {
-	    Bool ok, group_ok = TRUE;
+	    bool ok, group_ok = true;
 
 	    ok = bug7366_test(dpy);
 	    RECORD_RESULTS();
@@ -733,7 +733,7 @@ do {								\
 	}
 
         if (enabled_tests & TEST_GTK_ARGB_XBGR) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
 		ok = gtk_argb_xbgr_test(dpy);
 		RECORD_RESULTS();
@@ -743,12 +743,12 @@ do {								\
 	}
 
         if (enabled_tests & TEST_LIBREOFFICE_XRGB) {
-		Bool ok, group_ok = TRUE;
+		bool ok, group_ok = true;
 
-		ok = libreoffice_xrgb_test(dpy, FALSE);
+		ok = libreoffice_xrgb_test(dpy, false);
 		RECORD_RESULTS();
 
-		ok = libreoffice_xrgb_test(dpy, TRUE);
+		ok = libreoffice_xrgb_test(dpy, true);
 		RECORD_RESULTS();
 
 		if (group_ok)


More information about the xorg-commit mailing list