[cairo] [PATCH 2/2] xlib-surface fix

Jeff Muizelaar jeff at infidigm.net
Thu Aug 4 19:16:44 PDT 2005


The following patch replaces the incorrect use of buffer_diff on a
CAIRO_FORMAT_RGB24 buffer with the new function buffer_diff_noalpha from
the previous patch.


Index: test/xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/test/xlib-surface.c,v
retrieving revision 1.5
diff -u -r1.5 xlib-surface.c
--- test/xlib-surface.c	1 Aug 2005 20:33:47 -0000	1.5
+++ test/xlib-surface.c	5 Aug 2005 01:51:10 -0000
@@ -155,19 +155,19 @@
     if (offscreen) {
 	size_t offset = 4 * (SIZE * OFFSCREEN_OFFSET + OFFSCREEN_OFFSET);
 	
-	result = !buffer_diff (reference_data + offset,
-			       test_data + offset,
-			       diff_data + offset,
-			       SIZE - OFFSCREEN_OFFSET,
-			       SIZE - OFFSCREEN_OFFSET,
-			       4 * SIZE);
+	result = !buffer_diff_noalpha (reference_data + offset,
+				       test_data + offset,
+				       diff_data + offset,
+				       SIZE - OFFSCREEN_OFFSET,
+				       SIZE - OFFSCREEN_OFFSET,
+				       4 * SIZE);
     } else {
-	result = !buffer_diff (reference_data,
-			       test_data,
-			       diff_data,
-			       SIZE,
-			       SIZE,
-			       4 * SIZE);
+	result = !buffer_diff_noalpha (reference_data,
+				       test_data,
+				       diff_data,
+				       SIZE,
+				       SIZE,
+				       4 * SIZE);
     }
 
     fprintf (log_file, "xlib-surface: %s, %s, %s%s: %s\n",



More information about the cairo mailing list