Add rgb24 surface tests, support per-target reference images and support PS surface testing
reviewed by: cworth
69
ChangeLog
|
|
@ -1,3 +1,72 @@
|
|||
2005-09-29 Keith Packard <keithp@keithp.com>
|
||||
|
||||
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 <cworth@cworth.org>
|
||||
|
||||
* src/cairo-surface.c: (_cairo_surface_composite_trapezoids):
|
||||
|
|
|
|||
159
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 \
|
||||
|
|
|
|||
BIN
test/a8-mask-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 128 B |
|
|
@ -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:
|
||||
|
|
|
|||
BIN
test/caps-joins-ps-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
test/caps-joins-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
test/caps-sub-paths-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 186 B |
BIN
test/clip-all-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 114 B |
BIN
test/clip-nesting-ps-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 517 B |
BIN
test/clip-nesting-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 846 B |
BIN
test/clip-operator-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
test/clip-twice-ps-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
test/clip-twice-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
test/composite-integer-translate-over-repeat-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
test/composite-integer-translate-over-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
test/composite-integer-translate-source-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
test/create-from-png-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
test/create-from-png-stream-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
test/dash-caps-joins-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
test/dash-offset-negative-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 170 B |
BIN
test/fill-and-stroke-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 299 B |
BIN
test/fill-rule-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
test/filter-nearest-offset-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 254 B |
BIN
test/gradient-alpha-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 147 B |
BIN
test/leaky-polygon-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
test/line-width-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
test/linear-gradient-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
test/mask-ctm-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 140 B |
BIN
test/mask-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
test/mask-surface-ctm-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 140 B |
BIN
test/move-to-show-surface-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
test/nil-surface-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 106 B |
BIN
test/operator-clear-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
test/operator-source-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
test/paint-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 116 B |
BIN
test/paint-with-alpha-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 146 B |
BIN
test/path-data-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 523 B |
BIN
test/pixman-rotate-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 385 B |
BIN
test/rectangle-rounding-error-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
test/rel-path-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
test/scale-source-surface-paint-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 146 B |
BIN
test/self-copy-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
test/self-intersecting-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
test/set-source-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 114 B |
BIN
test/show-text-current-point-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
test/source-clip-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
test/source-surface-scale-paint-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 136 B |
BIN
test/surface-pattern-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 194 B |
BIN
test/text-antialias-gray-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 995 B |
BIN
test/text-antialias-none-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 284 B |
BIN
test/text-antialias-subpixel-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
test/text-pattern-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
test/text-rotate-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
test/transforms-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 318 B |
BIN
test/translate-show-surface-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
test/trap-clip-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
test/unantialiased-shapes-ps-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
test/unantialiased-shapes-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
test/unbounded-operator-rgb24-ref.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |