diff --git a/ChangeLog b/ChangeLog index cc7521c37..853fc7ee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,72 @@ +2005-09-29 Keith Packard + + reviewed by: cworth + + * test/Makefile.am: + * test/a8-mask-rgb24-ref.png: + * test/cairo-test.c: (cairo_target_format_name), + (create_argb_image_surface), (create_rgb_image_surface), + (create_xlib_surface), (create_ps_surface), + (ps_surface_write_to_png), (cleanup_ps), (cairo_test_for_target), + (cairo_test_expecting): + * test/caps-joins-ps-rgb24-ref.png: + * test/caps-joins-rgb24-ref.png: + * test/caps-sub-paths-rgb24-ref.png: + * test/clip-all-rgb24-ref.png: + * test/clip-nesting-ps-rgb24-ref.png: + * test/clip-nesting-rgb24-ref.png: + * test/clip-operator-rgb24-ref.png: + * test/clip-twice-ps-rgb24-ref.png: + * test/clip-twice-rgb24-ref.png: + * test/composite-integer-translate-over-repeat-rgb24-ref.png: + * test/composite-integer-translate-over-rgb24-ref.png: + * test/composite-integer-translate-source-rgb24-ref.png: + * test/create-from-png-rgb24-ref.png: + * test/create-from-png-stream-rgb24-ref.png: + * test/dash-caps-joins-rgb24-ref.png: + * test/dash-offset-negative-rgb24-ref.png: + * test/fill-and-stroke-rgb24-ref.png: + * test/fill-rule-rgb24-ref.png: + * test/filter-nearest-offset-rgb24-ref.png: + * test/gradient-alpha-rgb24-ref.png: + * test/leaky-polygon-rgb24-ref.png: + * test/line-width-rgb24-ref.png: + * test/linear-gradient-rgb24-ref.png: + * test/mask-ctm-rgb24-ref.png: + * test/mask-rgb24-ref.png: + * test/mask-surface-ctm-rgb24-ref.png: + * test/move-to-show-surface-rgb24-ref.png: + * test/nil-surface-rgb24-ref.png: + * test/operator-clear-rgb24-ref.png: + * test/operator-source-rgb24-ref.png: + * test/paint-rgb24-ref.png: + * test/paint-with-alpha-rgb24-ref.png: + * test/path-data-rgb24-ref.png: + * test/pixman-rotate-rgb24-ref.png: + * test/rectangle-rounding-error-rgb24-ref.png: + * test/rel-path-rgb24-ref.png: + * test/scale-source-surface-paint-rgb24-ref.png: + * test/self-copy-rgb24-ref.png: + * test/self-intersecting-rgb24-ref.png: + * test/set-source-rgb24-ref.png: + * test/show-text-current-point-rgb24-ref.png: + * test/source-clip-rgb24-ref.png: + * test/source-surface-scale-paint-rgb24-ref.png: + * test/surface-pattern-rgb24-ref.png: + * test/text-antialias-gray-rgb24-ref.png: + * test/text-antialias-none-rgb24-ref.png: + * test/text-antialias-subpixel-rgb24-ref.png: + * test/text-pattern-rgb24-ref.png: + * test/text-rotate-rgb24-ref.png: + * test/transforms-rgb24-ref.png: + * test/translate-show-surface-rgb24-ref.png: + * test/trap-clip-rgb24-ref.png: + * test/unantialiased-shapes-ps-rgb24-ref.png: + * test/unantialiased-shapes-rgb24-ref.png: + * test/unbounded-operator-rgb24-ref.png: + Add rgb24 surface tests, support per-target reference + images and support PS surface testing + 2005-09-29 Carl Worth * src/cairo-surface.c: (_cairo_surface_composite_trapezoids): diff --git a/test/Makefile.am b/test/Makefile.am index eb2b9be4e..d5d37dfcc 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -81,59 +81,115 @@ endif # All tests which have a reference image go here. # I really don't like having to repeat this list. Anyone know a good # way to avoid it? Can I use a wildcard here? -EXTRA_DIST = \ -a8-mask-ref.png \ -caps-joins-ref.png \ -caps-sub-paths-ref.png \ -clip-all-ref.png \ -clip-nesting-ref.png \ -clip-operator-ref.png \ -clip-twice-ref.png \ -composite-integer-translate-source-ref.png \ +EXTRA_DIST = \ +a8-mask-ref.png \ +a8-mask-rgb24-ref.png \ +caps-joins-ps-rgb24-ref.png \ +caps-joins-ref.png \ +caps-joins-rgb24-ref.png \ +caps-sub-paths-ref.png \ +caps-sub-paths-rgb24-ref.png \ +clip-all-ref.png \ +clip-all-rgb24-ref.png \ +clip-nesting-ps-rgb24-ref.png \ +clip-nesting-ref.png \ +clip-nesting-rgb24-ref.png \ +clip-operator-ref.png \ +clip-operator-rgb24-ref.png \ +clip-twice-ps-rgb24-ref.png \ +clip-twice-ref.png \ +clip-twice-rgb24-ref.png \ composite-integer-translate-over-ref.png \ composite-integer-translate-over-repeat-ref.png \ -create-from-png-ref.png \ -create-from-png-stream-ref.png \ -dash-caps-joins-ref.png \ -dash-offset-negative-ref.png \ -fill-and-stroke-ref.png \ -fill-rule-ref.png \ -filter-nearest-offset-ref.png \ -gradient-alpha-ref.png \ -leaky-polygon-ref.png \ -line-width-ref.png \ -linear-gradient-ref.png \ -mask-ref.png \ -mask-ctm-ref.png \ -mask-surface-ctm-ref.png \ -move-to-show-surface-ref.png \ -nil-surface-ref.png \ -operator-clear-ref.png \ -operator-source-ref.png \ -paint-ref.png \ -paint-with-alpha-ref.png \ -path-data-ref.png \ -pixman-rotate-ref.png \ -rectangle-rounding-error-ref.png \ -romedalen.png \ -self-copy-ref.png \ -self-intersecting-ref.png \ -scale-source-surface-paint-ref.png \ -set-source-ref.png \ -show-text-current-point-ref.png \ -source-clip-ref.png \ -source-surface-scale-paint-ref.png \ -surface-pattern-ref.png \ -text-antialias-gray-ref.png \ -text-antialias-none-ref.png \ -text-antialias-subpixel-ref.png \ -text-pattern-ref.png \ -transforms-ref.png \ -translate-show-surface-ref.png \ -trap-clip-ref.png \ -unantialiased-shapes-ref.png \ -unbounded-operator-ref.png \ -rel-path-ref.png +composite-integer-translate-over-repeat-rgb24-ref.png \ +composite-integer-translate-over-rgb24-ref.png \ +composite-integer-translate-source-ref.png \ +composite-integer-translate-source-rgb24-ref.png \ +create-from-png-ref.png \ +create-from-png-rgb24-ref.png \ +create-from-png-stream-ref.png \ +create-from-png-stream-rgb24-ref.png \ +dash-caps-joins-ref.png \ +dash-caps-joins-rgb24-ref.png \ +dash-offset-negative-ref.png \ +dash-offset-negative-rgb24-ref.png \ +fill-and-stroke-ref.png \ +fill-and-stroke-rgb24-ref.png \ +fill-rule-ref.png \ +fill-rule-rgb24-ref.png \ +filter-nearest-offset-ref.png \ +filter-nearest-offset-rgb24-ref.png \ +gradient-alpha-ref.png \ +gradient-alpha-rgb24-ref.png \ +leaky-polygon-ref.png \ +leaky-polygon-rgb24-ref.png \ +linear-gradient-ref.png \ +linear-gradient-rgb24-ref.png \ +line-width-ref.png \ +line-width-rgb24-ref.png \ +mask-ctm-ref.png \ +mask-ctm-rgb24-ref.png \ +mask-ref.png \ +mask-rgb24-ref.png \ +mask-surface-ctm-ref.png \ +mask-surface-ctm-rgb24-ref.png \ +move-to-show-surface-ref.png \ +move-to-show-surface-rgb24-ref.png \ +nil-surface-ref.png \ +nil-surface-rgb24-ref.png \ +operator-clear-ref.png \ +operator-clear-rgb24-ref.png \ +operator-source-ref.png \ +operator-source-rgb24-ref.png \ +paint-ref.png \ +paint-rgb24-ref.png \ +paint-with-alpha-ref.png \ +paint-with-alpha-rgb24-ref.png \ +path-data-ref.png \ +path-data-rgb24-ref.png \ +pixman-rotate-ref.png \ +pixman-rotate-rgb24-ref.png \ +rectangle-rounding-error-ref.png \ +rectangle-rounding-error-rgb24-ref.png \ +rel-path-ref.png \ +rel-path-rgb24-ref.png \ +romedalen.png \ +scale-source-surface-paint-ref.png \ +scale-source-surface-paint-rgb24-ref.png \ +self-copy-ref.png \ +self-copy-rgb24-ref.png \ +self-intersecting-ref.png \ +self-intersecting-rgb24-ref.png \ +set-source-ref.png \ +set-source-rgb24-ref.png \ +show-text-current-point-ref.png \ +show-text-current-point-rgb24-ref.png \ +source-clip-ref.png \ +source-clip-rgb24-ref.png \ +source-surface-scale-paint-ref.png \ +source-surface-scale-paint-rgb24-ref.png \ +surface-pattern-ref.png \ +surface-pattern-rgb24-ref.png \ +text-antialias-gray-ref.png \ +text-antialias-gray-rgb24-ref.png \ +text-antialias-none-ref.png \ +text-antialias-none-rgb24-ref.png \ +text-antialias-subpixel-ref.png \ +text-antialias-subpixel-rgb24-ref.png \ +text-pattern-ref.png \ +text-pattern-rgb24-ref.png \ +text-rotate-rgb24-ref.png \ +transforms-ref.png \ +transforms-rgb24-ref.png \ +translate-show-surface-ref.png \ +translate-show-surface-rgb24-ref.png \ +trap-clip-ref.png \ +trap-clip-rgb24-ref.png \ +unantialiased-shapes-ps-rgb24-ref.png \ +unantialiased-shapes-ref.png \ +unantialiased-shapes-rgb24-ref.png \ +unbounded-operator-ref.png \ +unbounded-operator-rgb24-ref.png # Any test for which the code committed to CVS is expected to fail # should be listed here. @@ -260,6 +316,7 @@ noinst_PROGRAMS = imagediff imagediff_LDADD = $(LDADDS) CLEANFILES = \ + *.ps \ *-out.png \ *-diff.png \ *.log \ diff --git a/test/a8-mask-rgb24-ref.png b/test/a8-mask-rgb24-ref.png new file mode 100644 index 000000000..38556156c Binary files /dev/null and b/test/a8-mask-rgb24-ref.png differ diff --git a/test/cairo-test.c b/test/cairo-test.c index 029002bc0..b528d9875 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -56,6 +56,7 @@ xunlink (const char *pathname); #define CAIRO_TEST_LOG_SUFFIX ".log" #define CAIRO_TEST_PNG_SUFFIX "-out.png" #define CAIRO_TEST_REF_SUFFIX "-ref.png" +#define CAIRO_TEST_RGB24_REF_SUFFIX "-rgb24-ref.png" #define CAIRO_TEST_DIFF_SUFFIX "-diff.png" /* Static data is messy, but we're coding for tests here, not a @@ -143,7 +144,10 @@ xunlink (const char *pathname) } typedef cairo_surface_t * -(*cairo_test_create_target_surface_t) (int width, int height, void **closure); +(*cairo_test_create_target_surface_t) (cairo_test_t *test, void **closure); + +typedef cairo_status_t +(*cairo_test_write_to_png_t) (cairo_surface_t *surface, const char *filename); typedef void (*cairo_test_cleanup_target_t) (void *closure); @@ -151,22 +155,49 @@ typedef void typedef struct _cairo_test_target { const char *name; + cairo_format_t reference_format; cairo_test_create_target_surface_t create_target_surface; + cairo_test_write_to_png_t write_to_png; cairo_test_cleanup_target_t cleanup_target; void *closure; } cairo_test_target_t; -static cairo_surface_t * -create_image_surface (int width, int height, void **closure) +static char * +cairo_target_format_name (const cairo_test_target_t *target) { - int stride = 4 * width; + char *format; + + if (target->reference_format == CAIRO_FORMAT_RGB24) + format = "rgb24"; + else + format = "argb32"; + return format; +} + +static cairo_surface_t * +create_argb_image_surface (cairo_test_t *test, void **closure) +{ + int stride = 4 * test->width; unsigned char *buf; - *closure = buf = xcalloc (stride * height, 1); + *closure = buf = xcalloc (stride * test->height, 1); return cairo_image_surface_create_for_data (buf, CAIRO_FORMAT_ARGB32, - width, height, stride); + test->width, test->height, stride); +} + +static cairo_surface_t * +create_rgb_image_surface (cairo_test_t *test, void **closure) +{ + int stride = 4 * test->width; + unsigned char *buf; + + *closure = buf = xcalloc (stride * test->height, 1); + + return cairo_image_surface_create_for_data (buf, + CAIRO_FORMAT_RGB24, + test->width, test->height, stride); } static void @@ -383,8 +414,10 @@ typedef struct _xlib_target_closure } xlib_target_closure_t; static cairo_surface_t * -create_xlib_surface (int width, int height, void **closure) +create_xlib_surface (cairo_test_t *test, void **closure) { + int width = test->width; + int height = test->height; xlib_target_closure_t *xtc; cairo_surface_t *surface; Display *dpy; @@ -440,6 +473,64 @@ cleanup_xlib (void *closure) } #endif +#if CAIRO_HAS_PS_SURFACE +#include "cairo-ps.h" + +cairo_user_data_key_t ps_closure_key; + +typedef struct _ps_target_closure +{ + char *filename; + int width, height; +} ps_target_closure_t; + +static cairo_surface_t * +create_ps_surface (cairo_test_t *test, void **closure) +{ + int width = test->width; + int height = test->height; + ps_target_closure_t *ptc; + cairo_surface_t *surface; + + *closure = ptc = xmalloc (sizeof (ps_target_closure_t)); + + ptc->width = width; + ptc->height = height; + + xasprintf (&ptc->filename, "%s-%s%s", test->name, "ps", ".ps"); + surface = cairo_ps_surface_create (ptc->filename, width, height); + if (!surface) { + free (ptc); + return NULL; + } + cairo_ps_surface_set_dpi (surface, 72., 72.); + cairo_surface_set_user_data (surface, &ps_closure_key, ptc, NULL); + return surface; +} + +static cairo_status_t +ps_surface_write_to_png (cairo_surface_t *surface, const char *filename) +{ + ps_target_closure_t *ptc = cairo_surface_get_user_data (surface, &ps_closure_key); + char command[4096]; + + cairo_surface_finish (surface); + sprintf (command, "gs -q -r72 -g%dx%d -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=%s %s", + ptc->width, ptc->height, filename, ptc->filename); + if (system (command) == 0) + return CAIRO_STATUS_SUCCESS; + return CAIRO_STATUS_WRITE_ERROR; +} + +static void +cleanup_ps (void *closure) +{ + ps_target_closure_t *ptc = closure; + free (ptc); +} + +#endif + static cairo_test_status_t cairo_test_for_target (cairo_test_t *test, cairo_test_draw_function_t draw, @@ -450,22 +541,35 @@ cairo_test_for_target (cairo_test_t *test, cairo_t *cr; char *png_name, *ref_name, *diff_name; char *srcdir; + char *format; cairo_test_status_t ret; /* Get the strings ready that we'll need. */ srcdir = getenv ("srcdir"); if (!srcdir) srcdir = "."; - xasprintf (&png_name, "%s-%s%s", test->name, - target->name, CAIRO_TEST_PNG_SUFFIX); - xasprintf (&ref_name, "%s/%s%s", srcdir, test->name, - CAIRO_TEST_REF_SUFFIX); - xasprintf (&diff_name, "%s-%s%s", test->name, - target->name, CAIRO_TEST_DIFF_SUFFIX); + format = cairo_target_format_name (target); + + xasprintf (&png_name, "%s-%s-%s%s", test->name, + target->name, format, CAIRO_TEST_PNG_SUFFIX); + xasprintf (&ref_name, "%s/%s-%s-%s%s", srcdir, test->name, + target->name, format, CAIRO_TEST_REF_SUFFIX); + if (access (ref_name, F_OK) != 0) { + char *ref_suffix; + free (ref_name); + + if (target->reference_format == CAIRO_FORMAT_RGB24) + ref_suffix = CAIRO_TEST_RGB24_REF_SUFFIX; + else + ref_suffix = CAIRO_TEST_REF_SUFFIX; + xasprintf (&ref_name, "%s/%s%s", srcdir, test->name, + ref_suffix); + } + xasprintf (&diff_name, "%s-%s-%s%s", test->name, + target->name, format, CAIRO_TEST_DIFF_SUFFIX); /* Run the actual drawing code. */ - surface = (target->create_target_surface) (test->width, test->height, - &target->closure); + surface = (target->create_target_surface) (test, &target->closure); if (surface == NULL) { cairo_test_log ("Error: Failed to set %s target\n", target->name); ret = CAIRO_TEST_UNTESTED; @@ -475,7 +579,10 @@ cairo_test_for_target (cairo_test_t *test, cr = cairo_create (surface); cairo_save (cr); - cairo_set_source_rgba (cr, 0, 0, 0, 0); + if (target->reference_format == CAIRO_FORMAT_RGB24) + cairo_set_source_rgba (cr, 1, 1, 1, 1); + else + cairo_set_source_rgba (cr, 0, 0, 0, 0); cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); cairo_paint (cr); cairo_restore (cr); @@ -489,6 +596,8 @@ cairo_test_for_target (cairo_test_t *test, goto UNWIND_CAIRO; } + cairo_show_page (cr); + if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { cairo_test_log ("Error: Function under test left cairo status in an error state: %s\n", cairo_status_to_string (cairo_status (cr))); @@ -499,7 +608,7 @@ cairo_test_for_target (cairo_test_t *test, /* Skip image check for tests with no image (width,height == 0,0) */ if (test->width != 0 && test->height != 0) { int pixels_changed; - cairo_surface_write_to_png (surface, png_name); + (target->write_to_png) (surface, png_name); pixels_changed = image_diff (png_name, ref_name, diff_name); if (pixels_changed) { if (pixels_changed > 0) @@ -536,21 +645,42 @@ cairo_test_expecting (cairo_test_t *test, cairo_test_draw_function_t draw, cairo_test_status_t status, ret; cairo_test_target_t targets[] = { - { "image", create_image_surface, cleanup_image}, + { "image", CAIRO_FORMAT_ARGB32, + create_argb_image_surface, cairo_surface_write_to_png, + cleanup_image }, + { "image", CAIRO_FORMAT_RGB24, + create_rgb_image_surface, cairo_surface_write_to_png, + cleanup_image }, #if 0 /* #ifdef CAIRO_HAS_GLITZ_SURFACE */ - { "glitz", create_glitz_surface, cleanup_glitz}, + { "glitz", CAIRO_FORMAT_ARGB32, + create_glitz_surface, cairo_surface_write_to_png, + cleanup_glitz }, #endif #if 0 && CAIRO_HAS_QUARTZ_SURFACE - { "quartz", create_quartz_surface, cleanup_quartz}, + { "quartz", CAIRO_FORMAT_RGB24, + create_quartz_surface, cairo_surface_write_to_png, + cleanup_quartz }, #endif #if 0 && CAIRO_HAS_WIN32_SURFACE - { "win32", create_win32_surface, cleanup_win32}, + { "win32", CAIRO_FORMAT_RGB24, + create_win32_surface, cairo_surface_write_to_png, + cleanup_win32 }, #endif #if CAIRO_HAS_XCB_SURFACE - { "xcb", create_xcb_surface, cleanup_xcb}, + { "xcb", CAIRO_FORMAT_ARGB32, + create_xcb_surface, cairo_surface_write_to_png, cleanup_xcb}, #endif #if CAIRO_HAS_XLIB_SURFACE - { "xlib", create_xlib_surface, cleanup_xlib}, + { "xlib", CAIRO_FORMAT_ARGB32, + create_xlib_surface, cairo_surface_write_to_png, cleanup_xlib}, +#endif +#if CAIRO_HAS_PS_SURFACE + { "ps", CAIRO_FORMAT_RGB24, + create_ps_surface, ps_surface_write_to_png, cleanup_ps }, +#endif +#if 0 && CAIRO_HAS_PDF_SURFACE + { "pdf", CAIRO_FORMAT_RGB24, + create_pdf_surface, pdf_surface_write_to_png, cleanup_pdf }, #endif }; @@ -571,7 +701,7 @@ cairo_test_expecting (cairo_test_t *test, cairo_test_draw_function_t draw, for (i=0; i < sizeof(targets)/sizeof(targets[0]); i++) { cairo_test_target_t *target = &targets[i]; cairo_test_log ("Testing %s with %s target\n", test->name, target->name); - printf ("%s-%s:\t", test->name, target->name); + printf ("%s-%s-%s:\t", test->name, target->name, cairo_target_format_name(target)); status = cairo_test_for_target (test, draw, target); switch (status) { case CAIRO_TEST_SUCCESS: diff --git a/test/caps-joins-ps-rgb24-ref.png b/test/caps-joins-ps-rgb24-ref.png new file mode 100644 index 000000000..db31cc65f Binary files /dev/null and b/test/caps-joins-ps-rgb24-ref.png differ diff --git a/test/caps-joins-rgb24-ref.png b/test/caps-joins-rgb24-ref.png new file mode 100644 index 000000000..bf3b21478 Binary files /dev/null and b/test/caps-joins-rgb24-ref.png differ diff --git a/test/caps-sub-paths-rgb24-ref.png b/test/caps-sub-paths-rgb24-ref.png new file mode 100644 index 000000000..751194e7c Binary files /dev/null and b/test/caps-sub-paths-rgb24-ref.png differ diff --git a/test/clip-all-rgb24-ref.png b/test/clip-all-rgb24-ref.png new file mode 100644 index 000000000..0e222f09e Binary files /dev/null and b/test/clip-all-rgb24-ref.png differ diff --git a/test/clip-nesting-ps-rgb24-ref.png b/test/clip-nesting-ps-rgb24-ref.png new file mode 100644 index 000000000..f5b638590 Binary files /dev/null and b/test/clip-nesting-ps-rgb24-ref.png differ diff --git a/test/clip-nesting-rgb24-ref.png b/test/clip-nesting-rgb24-ref.png new file mode 100644 index 000000000..808d1da33 Binary files /dev/null and b/test/clip-nesting-rgb24-ref.png differ diff --git a/test/clip-operator-rgb24-ref.png b/test/clip-operator-rgb24-ref.png new file mode 100644 index 000000000..1d3c03a4f Binary files /dev/null and b/test/clip-operator-rgb24-ref.png differ diff --git a/test/clip-twice-ps-rgb24-ref.png b/test/clip-twice-ps-rgb24-ref.png new file mode 100644 index 000000000..e93defeca Binary files /dev/null and b/test/clip-twice-ps-rgb24-ref.png differ diff --git a/test/clip-twice-rgb24-ref.png b/test/clip-twice-rgb24-ref.png new file mode 100644 index 000000000..1e97392c9 Binary files /dev/null and b/test/clip-twice-rgb24-ref.png differ diff --git a/test/composite-integer-translate-over-repeat-rgb24-ref.png b/test/composite-integer-translate-over-repeat-rgb24-ref.png new file mode 100644 index 000000000..8b84dd23b Binary files /dev/null and b/test/composite-integer-translate-over-repeat-rgb24-ref.png differ diff --git a/test/composite-integer-translate-over-rgb24-ref.png b/test/composite-integer-translate-over-rgb24-ref.png new file mode 100644 index 000000000..40796e156 Binary files /dev/null and b/test/composite-integer-translate-over-rgb24-ref.png differ diff --git a/test/composite-integer-translate-source-rgb24-ref.png b/test/composite-integer-translate-source-rgb24-ref.png new file mode 100644 index 000000000..64c785924 Binary files /dev/null and b/test/composite-integer-translate-source-rgb24-ref.png differ diff --git a/test/create-from-png-rgb24-ref.png b/test/create-from-png-rgb24-ref.png new file mode 100644 index 000000000..0493617ab Binary files /dev/null and b/test/create-from-png-rgb24-ref.png differ diff --git a/test/create-from-png-stream-rgb24-ref.png b/test/create-from-png-stream-rgb24-ref.png new file mode 100644 index 000000000..0493617ab Binary files /dev/null and b/test/create-from-png-stream-rgb24-ref.png differ diff --git a/test/dash-caps-joins-rgb24-ref.png b/test/dash-caps-joins-rgb24-ref.png new file mode 100644 index 000000000..28339f8ed Binary files /dev/null and b/test/dash-caps-joins-rgb24-ref.png differ diff --git a/test/dash-offset-negative-rgb24-ref.png b/test/dash-offset-negative-rgb24-ref.png new file mode 100644 index 000000000..4c954e087 Binary files /dev/null and b/test/dash-offset-negative-rgb24-ref.png differ diff --git a/test/fill-and-stroke-rgb24-ref.png b/test/fill-and-stroke-rgb24-ref.png new file mode 100644 index 000000000..8b08c0f91 Binary files /dev/null and b/test/fill-and-stroke-rgb24-ref.png differ diff --git a/test/fill-rule-rgb24-ref.png b/test/fill-rule-rgb24-ref.png new file mode 100644 index 000000000..31a84d1b1 Binary files /dev/null and b/test/fill-rule-rgb24-ref.png differ diff --git a/test/filter-nearest-offset-rgb24-ref.png b/test/filter-nearest-offset-rgb24-ref.png new file mode 100644 index 000000000..46092e3c7 Binary files /dev/null and b/test/filter-nearest-offset-rgb24-ref.png differ diff --git a/test/gradient-alpha-rgb24-ref.png b/test/gradient-alpha-rgb24-ref.png new file mode 100644 index 000000000..23aeae0ce Binary files /dev/null and b/test/gradient-alpha-rgb24-ref.png differ diff --git a/test/leaky-polygon-rgb24-ref.png b/test/leaky-polygon-rgb24-ref.png new file mode 100644 index 000000000..6a77482bc Binary files /dev/null and b/test/leaky-polygon-rgb24-ref.png differ diff --git a/test/line-width-rgb24-ref.png b/test/line-width-rgb24-ref.png new file mode 100644 index 000000000..a63262f0c Binary files /dev/null and b/test/line-width-rgb24-ref.png differ diff --git a/test/linear-gradient-rgb24-ref.png b/test/linear-gradient-rgb24-ref.png new file mode 100644 index 000000000..454ed1f21 Binary files /dev/null and b/test/linear-gradient-rgb24-ref.png differ diff --git a/test/mask-ctm-rgb24-ref.png b/test/mask-ctm-rgb24-ref.png new file mode 100644 index 000000000..3331d5bec Binary files /dev/null and b/test/mask-ctm-rgb24-ref.png differ diff --git a/test/mask-rgb24-ref.png b/test/mask-rgb24-ref.png new file mode 100644 index 000000000..0148c6a63 Binary files /dev/null and b/test/mask-rgb24-ref.png differ diff --git a/test/mask-surface-ctm-rgb24-ref.png b/test/mask-surface-ctm-rgb24-ref.png new file mode 100644 index 000000000..3331d5bec Binary files /dev/null and b/test/mask-surface-ctm-rgb24-ref.png differ diff --git a/test/move-to-show-surface-rgb24-ref.png b/test/move-to-show-surface-rgb24-ref.png new file mode 100644 index 000000000..b5f83489f Binary files /dev/null and b/test/move-to-show-surface-rgb24-ref.png differ diff --git a/test/nil-surface-rgb24-ref.png b/test/nil-surface-rgb24-ref.png new file mode 100644 index 000000000..44b099823 Binary files /dev/null and b/test/nil-surface-rgb24-ref.png differ diff --git a/test/operator-clear-rgb24-ref.png b/test/operator-clear-rgb24-ref.png new file mode 100644 index 000000000..d528f19e2 Binary files /dev/null and b/test/operator-clear-rgb24-ref.png differ diff --git a/test/operator-source-rgb24-ref.png b/test/operator-source-rgb24-ref.png new file mode 100644 index 000000000..594fc7b75 Binary files /dev/null and b/test/operator-source-rgb24-ref.png differ diff --git a/test/paint-rgb24-ref.png b/test/paint-rgb24-ref.png new file mode 100644 index 000000000..fff03b363 Binary files /dev/null and b/test/paint-rgb24-ref.png differ diff --git a/test/paint-with-alpha-rgb24-ref.png b/test/paint-with-alpha-rgb24-ref.png new file mode 100644 index 000000000..f8d75bcf1 Binary files /dev/null and b/test/paint-with-alpha-rgb24-ref.png differ diff --git a/test/path-data-rgb24-ref.png b/test/path-data-rgb24-ref.png new file mode 100644 index 000000000..627ba8686 Binary files /dev/null and b/test/path-data-rgb24-ref.png differ diff --git a/test/pixman-rotate-rgb24-ref.png b/test/pixman-rotate-rgb24-ref.png new file mode 100644 index 000000000..c9d00fde7 Binary files /dev/null and b/test/pixman-rotate-rgb24-ref.png differ diff --git a/test/rectangle-rounding-error-rgb24-ref.png b/test/rectangle-rounding-error-rgb24-ref.png new file mode 100644 index 000000000..c3a6840c0 Binary files /dev/null and b/test/rectangle-rounding-error-rgb24-ref.png differ diff --git a/test/rel-path-rgb24-ref.png b/test/rel-path-rgb24-ref.png new file mode 100644 index 000000000..65567398a Binary files /dev/null and b/test/rel-path-rgb24-ref.png differ diff --git a/test/scale-source-surface-paint-rgb24-ref.png b/test/scale-source-surface-paint-rgb24-ref.png new file mode 100644 index 000000000..07aad3b6a Binary files /dev/null and b/test/scale-source-surface-paint-rgb24-ref.png differ diff --git a/test/self-copy-rgb24-ref.png b/test/self-copy-rgb24-ref.png new file mode 100644 index 000000000..92a20db64 Binary files /dev/null and b/test/self-copy-rgb24-ref.png differ diff --git a/test/self-intersecting-rgb24-ref.png b/test/self-intersecting-rgb24-ref.png new file mode 100644 index 000000000..51217926f Binary files /dev/null and b/test/self-intersecting-rgb24-ref.png differ diff --git a/test/set-source-rgb24-ref.png b/test/set-source-rgb24-ref.png new file mode 100644 index 000000000..617c9f75a Binary files /dev/null and b/test/set-source-rgb24-ref.png differ diff --git a/test/show-text-current-point-rgb24-ref.png b/test/show-text-current-point-rgb24-ref.png new file mode 100644 index 000000000..9233244e1 Binary files /dev/null and b/test/show-text-current-point-rgb24-ref.png differ diff --git a/test/source-clip-rgb24-ref.png b/test/source-clip-rgb24-ref.png new file mode 100644 index 000000000..8df2bff97 Binary files /dev/null and b/test/source-clip-rgb24-ref.png differ diff --git a/test/source-surface-scale-paint-rgb24-ref.png b/test/source-surface-scale-paint-rgb24-ref.png new file mode 100644 index 000000000..341269768 Binary files /dev/null and b/test/source-surface-scale-paint-rgb24-ref.png differ diff --git a/test/surface-pattern-rgb24-ref.png b/test/surface-pattern-rgb24-ref.png new file mode 100644 index 000000000..1a641065b Binary files /dev/null and b/test/surface-pattern-rgb24-ref.png differ diff --git a/test/text-antialias-gray-rgb24-ref.png b/test/text-antialias-gray-rgb24-ref.png new file mode 100644 index 000000000..8b60f7a5f Binary files /dev/null and b/test/text-antialias-gray-rgb24-ref.png differ diff --git a/test/text-antialias-none-rgb24-ref.png b/test/text-antialias-none-rgb24-ref.png new file mode 100644 index 000000000..a8ccf960d Binary files /dev/null and b/test/text-antialias-none-rgb24-ref.png differ diff --git a/test/text-antialias-subpixel-rgb24-ref.png b/test/text-antialias-subpixel-rgb24-ref.png new file mode 100644 index 000000000..88f76c08e Binary files /dev/null and b/test/text-antialias-subpixel-rgb24-ref.png differ diff --git a/test/text-pattern-rgb24-ref.png b/test/text-pattern-rgb24-ref.png new file mode 100644 index 000000000..9ef43dda7 Binary files /dev/null and b/test/text-pattern-rgb24-ref.png differ diff --git a/test/text-rotate-rgb24-ref.png b/test/text-rotate-rgb24-ref.png new file mode 100644 index 000000000..6f5135617 Binary files /dev/null and b/test/text-rotate-rgb24-ref.png differ diff --git a/test/transforms-rgb24-ref.png b/test/transforms-rgb24-ref.png new file mode 100644 index 000000000..574456926 Binary files /dev/null and b/test/transforms-rgb24-ref.png differ diff --git a/test/translate-show-surface-rgb24-ref.png b/test/translate-show-surface-rgb24-ref.png new file mode 100644 index 000000000..a43f8b69c Binary files /dev/null and b/test/translate-show-surface-rgb24-ref.png differ diff --git a/test/trap-clip-rgb24-ref.png b/test/trap-clip-rgb24-ref.png new file mode 100644 index 000000000..b1958b086 Binary files /dev/null and b/test/trap-clip-rgb24-ref.png differ diff --git a/test/unantialiased-shapes-ps-rgb24-ref.png b/test/unantialiased-shapes-ps-rgb24-ref.png new file mode 100644 index 000000000..b73300b33 Binary files /dev/null and b/test/unantialiased-shapes-ps-rgb24-ref.png differ diff --git a/test/unantialiased-shapes-rgb24-ref.png b/test/unantialiased-shapes-rgb24-ref.png new file mode 100644 index 000000000..ad7999327 Binary files /dev/null and b/test/unantialiased-shapes-rgb24-ref.png differ diff --git a/test/unbounded-operator-rgb24-ref.png b/test/unbounded-operator-rgb24-ref.png new file mode 100644 index 000000000..236775634 Binary files /dev/null and b/test/unbounded-operator-rgb24-ref.png differ