diff options
-rw-r--r-- | boilerplate/cairo-boilerplate-directfb.c | 6 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-drm.c | 6 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-gl.c | 12 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-pdf.c | 4 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-ps.c | 8 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-quartz.c | 3 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-script.c | 2 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-skia.c | 6 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-svg.c | 8 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-test-surfaces.c | 21 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-vg.c | 12 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-win32-printing.c | 4 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-win32.c | 6 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-xcb.c | 21 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-xlib.c | 12 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate.c | 39 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate.h | 1 | ||||
-rw-r--r-- | perf/cairo-perf-micro.c | 59 | ||||
-rw-r--r-- | perf/cairo-perf-trace.c | 67 |
19 files changed, 120 insertions, 177 deletions
diff --git a/boilerplate/cairo-boilerplate-directfb.c b/boilerplate/cairo-boilerplate-directfb.c index 6815dd1b..59a77e1d 100644 --- a/boilerplate/cairo-boilerplate-directfb.c +++ b/boilerplate/cairo-boilerplate-directfb.c @@ -216,7 +216,8 @@ static const cairo_boilerplate_target_t targets[] = { NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, - _cairo_boilerplate_directfb_cleanup + _cairo_boilerplate_directfb_cleanup, + NULL, TRUE, FALSE, FALSE }, { "directfb-bitmap", "directfb", NULL, NULL, @@ -226,7 +227,8 @@ static const cairo_boilerplate_target_t targets[] = { NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, - _cairo_boilerplate_directfb_cleanup + _cairo_boilerplate_directfb_cleanup, + NULL, FALSE, FALSE, FALSE }, }; CAIRO_BOILERPLATE (directfb, targets); diff --git a/boilerplate/cairo-boilerplate-drm.c b/boilerplate/cairo-boilerplate-drm.c index 77a052dd..67fb3aa3 100644 --- a/boilerplate/cairo-boilerplate-drm.c +++ b/boilerplate/cairo-boilerplate-drm.c @@ -76,7 +76,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, NULL, - _cairo_boilerplate_drm_synchronize + _cairo_boilerplate_drm_synchronize, + TRUE, FALSE, FALSE }, { "drm", "drm", NULL, NULL, @@ -87,7 +88,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, NULL, - _cairo_boilerplate_drm_synchronize + _cairo_boilerplate_drm_synchronize, + FALSE, FALSE, FALSE }, }; CAIRO_BOILERPLATE (drm, targets) diff --git a/boilerplate/cairo-boilerplate-gl.c b/boilerplate/cairo-boilerplate-gl.c index 59de580d..323c875e 100644 --- a/boilerplate/cairo-boilerplate-gl.c +++ b/boilerplate/cairo-boilerplate-gl.c @@ -332,7 +332,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_gl_cleanup, - _cairo_boilerplate_gl_synchronize + _cairo_boilerplate_gl_synchronize, + TRUE, FALSE, FALSE }, { "gl", "gl", NULL, NULL, @@ -343,7 +344,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_gl_cleanup, - _cairo_boilerplate_gl_synchronize + _cairo_boilerplate_gl_synchronize, + FALSE, FALSE, FALSE }, { "gl-window", "gl", NULL, NULL, @@ -355,7 +357,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_gl_cleanup, - _cairo_boilerplate_gl_synchronize + _cairo_boilerplate_gl_synchronize, + FALSE, FALSE, FALSE }, #if CAIRO_HAS_EGL_FUNCTIONS { @@ -367,7 +370,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_egl_cleanup, - _cairo_boilerplate_egl_synchronize + _cairo_boilerplate_egl_synchronize, + TRUE, FALSE, FALSE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c index 6790abd6..d45e6ca8 100644 --- a/boilerplate/cairo-boilerplate-pdf.c +++ b/boilerplate/cairo-boilerplate-pdf.c @@ -241,7 +241,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_pdf_get_image_surface, _cairo_boilerplate_pdf_surface_write_to_png, _cairo_boilerplate_pdf_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "pdf", "pdf", ".pdf", NULL, @@ -253,7 +253,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_pdf_get_image_surface, _cairo_boilerplate_pdf_surface_write_to_png, _cairo_boilerplate_pdf_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c index 5ba68aba..a0a5447f 100644 --- a/boilerplate/cairo-boilerplate-ps.c +++ b/boilerplate/cairo-boilerplate-ps.c @@ -306,7 +306,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_ps_get_image_surface, _cairo_boilerplate_ps_surface_write_to_png, _cairo_boilerplate_ps_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "ps2", "ps", ".ps", NULL, @@ -318,7 +318,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_ps_get_image_surface, _cairo_boilerplate_ps_surface_write_to_png, _cairo_boilerplate_ps_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "ps3", "ps", ".ps", NULL, @@ -331,7 +331,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_ps_get_image_surface, _cairo_boilerplate_ps_surface_write_to_png, _cairo_boilerplate_ps_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "ps3", "ps", ".ps", NULL, @@ -343,7 +343,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_ps_get_image_surface, _cairo_boilerplate_ps_surface_write_to_png, _cairo_boilerplate_ps_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-quartz.c b/boilerplate/cairo-boilerplate-quartz.c index 1948d837..2bba47a2 100644 --- a/boilerplate/cairo-boilerplate-quartz.c +++ b/boilerplate/cairo-boilerplate-quartz.c @@ -57,6 +57,8 @@ static const cairo_boilerplate_target_t targets[] = { NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, + NULL, NULL, + TRUE, FALSE, FALSE }, { "quartz", "quartz", NULL, NULL, @@ -66,6 +68,7 @@ static const cairo_boilerplate_target_t targets[] = { NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, }; CAIRO_BOILERPLATE (quartz, targets) diff --git a/boilerplate/cairo-boilerplate-script.c b/boilerplate/cairo-boilerplate-script.c index 7c052a34..0cd7f9db 100644 --- a/boilerplate/cairo-boilerplate-script.c +++ b/boilerplate/cairo-boilerplate-script.c @@ -136,6 +136,6 @@ static const cairo_boilerplate_target_t target[] = {{ _cairo_boilerplate_script_get_image_surface, _cairo_boilerplate_script_surface_write_to_png, _cairo_boilerplate_script_cleanup, - NULL, FALSE + NULL, FALSE, FALSE, FALSE }}; CAIRO_BOILERPLATE (script, target) diff --git a/boilerplate/cairo-boilerplate-skia.c b/boilerplate/cairo-boilerplate-skia.c index 13ab00b7..f2b8dd79 100644 --- a/boilerplate/cairo-boilerplate-skia.c +++ b/boilerplate/cairo-boilerplate-skia.c @@ -37,7 +37,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_skia_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, TRUE, FALSE, FALSE }, { "skia", "skia", NULL, NULL, @@ -46,7 +47,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_skia_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, }; CAIRO_BOILERPLATE (skia, targets) diff --git a/boilerplate/cairo-boilerplate-svg.c b/boilerplate/cairo-boilerplate-svg.c index fb83513b..43305da8 100644 --- a/boilerplate/cairo-boilerplate-svg.c +++ b/boilerplate/cairo-boilerplate-svg.c @@ -282,7 +282,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_svg_get_image_surface, _cairo_boilerplate_svg_surface_write_to_png, _cairo_boilerplate_svg_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "svg11", "svg", NULL, NULL, @@ -294,7 +294,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_svg_get_image_surface, _cairo_boilerplate_svg_surface_write_to_png, _cairo_boilerplate_svg_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "svg12", "svg", NULL, NULL, @@ -306,7 +306,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_svg_get_image_surface, _cairo_boilerplate_svg_surface_write_to_png, _cairo_boilerplate_svg_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "svg12", "svg", NULL, NULL, @@ -318,7 +318,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_svg_get_image_surface, _cairo_boilerplate_svg_surface_write_to_png, _cairo_boilerplate_svg_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-test-surfaces.c b/boilerplate/cairo-boilerplate-test-surfaces.c index 39d4f4f5..ace6dcc7 100644 --- a/boilerplate/cairo-boilerplate-test-surfaces.c +++ b/boilerplate/cairo-boilerplate-test-surfaces.c @@ -237,7 +237,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_test_fallback_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, { "test-fallback", "image", NULL, NULL, @@ -247,7 +248,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_test_fallback_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, { "test-fallback16", "image", NULL, NULL, @@ -257,7 +259,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_test_fallback16_create_surface, NULL, NULL, NULL, /* _cairo_boilerplate_get_image_surface, */ - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, { "test-fallback16", "image", NULL, NULL, @@ -267,7 +270,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_test_fallback16_create_surface, NULL, NULL, NULL, /* _cairo_boilerplate_get_image_surface, */ - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, #if CAIRO_HAS_TEST_PAGINATED_SURFACE { @@ -280,8 +284,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_test_paginated_get_image_surface, _cairo_boilerplate_test_paginated_surface_write_to_png, _cairo_boilerplate_test_paginated_cleanup, - NULL, - FALSE, TRUE, + NULL, FALSE, TRUE, FALSE }, { "test-paginated", "image", NULL, NULL, @@ -293,8 +296,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_test_paginated_get_image_surface, _cairo_boilerplate_test_paginated_surface_write_to_png, _cairo_boilerplate_test_paginated_cleanup, - NULL, - FALSE, TRUE + NULL, FALSE, TRUE, FALSE }, #endif #if CAIRO_HAS_TEST_WRAPPING_SURFACE @@ -307,6 +309,7 @@ static const cairo_boilerplate_target_t targets[] = { NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, #endif #if CAIRO_HAS_TEST_NULL_SURFACE @@ -319,7 +322,7 @@ static const cairo_boilerplate_target_t targets[] = { NULL, NULL, NULL, NULL, NULL, NULL, - TRUE, FALSE + TRUE, TRUE, FALSE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-vg.c b/boilerplate/cairo-boilerplate-vg.c index 2ea1a07b..8c82628d 100644 --- a/boilerplate/cairo-boilerplate-vg.c +++ b/boilerplate/cairo-boilerplate-vg.c @@ -311,7 +311,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_vg_cleanup_glx, - _cairo_boilerplate_vg_synchronize + _cairo_boilerplate_vg_synchronize, + TRUE, FALSE, FALSE }, { "vg-glx", "vg", NULL, NULL, @@ -322,7 +323,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_vg_cleanup_glx, - _cairo_boilerplate_vg_synchronize + _cairo_boilerplate_vg_synchronize, + FALSE, FALSE, FALSE }, #endif #if CAIRO_HAS_EGL_FUNCTIONS @@ -335,7 +337,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_vg_cleanup_egl, - _cairo_boilerplate_vg_synchronize + _cairo_boilerplate_vg_synchronize, + TRUE, FALSE, FALSE }, { "vg-egl", "vg", NULL, NULL, @@ -346,7 +349,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_vg_cleanup_egl, - _cairo_boilerplate_vg_synchronize + _cairo_boilerplate_vg_synchronize, + FALSE, FALSE, FALSE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-win32-printing.c b/boilerplate/cairo-boilerplate-win32-printing.c index b5a6fed3..4aeeb24b 100644 --- a/boilerplate/cairo-boilerplate-win32-printing.c +++ b/boilerplate/cairo-boilerplate-win32-printing.c @@ -353,7 +353,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_win32_printing_get_image_surface, _cairo_boilerplate_win32_printing_surface_write_to_png, _cairo_boilerplate_win32_printing_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, { "win32-printing", "win32", ".ps", NULL, @@ -364,7 +364,7 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_win32_printing_get_image_surface, _cairo_boilerplate_win32_printing_surface_write_to_png, _cairo_boilerplate_win32_printing_cleanup, - NULL, TRUE, TRUE + NULL, FALSE, TRUE, TRUE }, #endif }; diff --git a/boilerplate/cairo-boilerplate-win32.c b/boilerplate/cairo-boilerplate-win32.c index 2b3abb18..50ec90ad 100644 --- a/boilerplate/cairo-boilerplate-win32.c +++ b/boilerplate/cairo-boilerplate-win32.c @@ -56,7 +56,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_win32_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, TRUE, FALSE, FALSE }, /* Testing the win32 surface isn't interesting, since for * ARGB images it just chains to the image backend @@ -68,7 +69,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_win32_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, FALSE, FALSE, FALSE }, }; CAIRO_BOILERPLATE (win32, targets) diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c index 0e5c3b94..5ddf3fa8 100644 --- a/boilerplate/cairo-boilerplate-xcb.c +++ b/boilerplate/cairo-boilerplate-xcb.c @@ -601,7 +601,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + TRUE, FALSE, FALSE }, { "xcb", "xlib", NULL, NULL, @@ -613,7 +614,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + FALSE, FALSE, FALSE }, { "xcb-window", "xlib", NULL, NULL, @@ -625,7 +627,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + FALSE, FALSE, FALSE }, { "xcb-window&", "xlib", NULL, NULL, @@ -637,7 +640,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + FALSE, FALSE, FALSE }, { "xcb-render-0.0", "xlib-fallback", NULL, NULL, @@ -649,7 +653,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + TRUE, FALSE, FALSE }, { "xcb-render-0.0", "xlib-fallback", NULL, NULL, @@ -661,7 +666,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + FALSE, FALSE, FALSE }, { "xcb-fallback", "xlib-fallback", NULL, NULL, @@ -673,7 +679,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xcb_cleanup, - _cairo_boilerplate_xcb_synchronize + _cairo_boilerplate_xcb_synchronize, + FALSE, FALSE, FALSE }, }; CAIRO_BOILERPLATE (xcb, targets) diff --git a/boilerplate/cairo-boilerplate-xlib.c b/boilerplate/cairo-boilerplate-xlib.c index fe54d988..1ddaaf40 100644 --- a/boilerplate/cairo-boilerplate-xlib.c +++ b/boilerplate/cairo-boilerplate-xlib.c @@ -445,7 +445,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xlib_cleanup, - _cairo_boilerplate_xlib_synchronize + _cairo_boilerplate_xlib_synchronize, + TRUE, FALSE, FALSE }, { "xlib", "xlib", NULL, "xlib-reference", @@ -456,7 +457,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xlib_cleanup, - _cairo_boilerplate_xlib_synchronize + _cairo_boilerplate_xlib_synchronize, + FALSE, FALSE, FALSE }, { "xlib-reference", "xlib", NULL, NULL, @@ -467,7 +469,8 @@ static const cairo_boilerplate_target_t targets[] = { NULL, /* get_image */ cairo_surface_write_to_png, _cairo_boilerplate_xlib_cleanup, - _cairo_boilerplate_xlib_synchronize + _cairo_boilerplate_xlib_synchronize, + FALSE, FALSE, FALSE }, #endif #if CAIRO_HAS_XLIB_SURFACE @@ -482,7 +485,8 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, _cairo_boilerplate_xlib_cleanup, - _cairo_boilerplate_xlib_synchronize + _cairo_boilerplate_xlib_synchronize, + FALSE, FALSE, FALSE }, #endif }; diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index 65e92fa1..cc082801 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -149,6 +149,23 @@ _cairo_boilerplate_image_create_surface (const char *name, return cairo_image_surface_create (format, ceil (width), ceil (height)); } +static cairo_surface_t * +_cairo_boilerplate_image16_create_surface (const char *name, + cairo_content_t content, + double width, + double height, + double max_width, + double max_height, + cairo_boilerplate_mode_t mode, + int id, + void **closure) +{ + *closure = NULL; + + /* XXX force CAIRO_CONTENT_COLOR */ + return cairo_image_surface_create (CAIRO_FORMAT_RGB16_565, ceil (width), ceil (height)); +} + #if CAIRO_HAS_RECORDING_SURFACE static cairo_surface_t * _cairo_boilerplate_recording_create_surface (const char *name, @@ -301,7 +318,9 @@ static const cairo_boilerplate_target_t builtin_targets[] = { NULL, _cairo_boilerplate_image_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, + TRUE, FALSE, FALSE }, { "image", "image", NULL, NULL, @@ -309,7 +328,19 @@ static const cairo_boilerplate_target_t builtin_targets[] = { NULL, _cairo_boilerplate_image_create_surface, NULL, NULL, _cairo_boilerplate_get_image_surface, - cairo_surface_write_to_png + cairo_surface_write_to_png, + NULL, NULL, + FALSE, FALSE, FALSE + }, + { + "image16", "image", NULL, NULL, + CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, 0, + NULL, _cairo_boilerplate_image16_create_surface, + NULL, NULL, + _cairo_boilerplate_get_image_surface, + cairo_surface_write_to_png, + NULL, NULL, + TRUE, FALSE, FALSE }, #if CAIRO_HAS_RECORDING_SURFACE { @@ -321,7 +352,7 @@ static const cairo_boilerplate_target_t builtin_targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, NULL, NULL, - FALSE, TRUE + FALSE, FALSE, TRUE }, { "recording", "image", NULL, NULL, @@ -332,7 +363,7 @@ static const cairo_boilerplate_target_t builtin_targets[] = { _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, NULL, NULL, - FALSE, TRUE + FALSE, FALSE, TRUE }, #endif }; diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h index 6f9afd13..12bcd79e 100644 --- a/boilerplate/cairo-boilerplate.h +++ b/boilerplate/cairo-boilerplate.h @@ -165,6 +165,7 @@ typedef struct _cairo_boilerplate_target { cairo_boilerplate_write_to_png_t write_to_png; cairo_boilerplate_cleanup_t cleanup; cairo_boilerplate_wait_t synchronize; + cairo_bool_t is_measurable; cairo_bool_t is_vector; cairo_bool_t is_recording; } cairo_boilerplate_target_t; diff --git a/perf/cairo-perf-micro.c b/perf/cairo-perf-micro.c index eec32ef7..ec40409c 100644 --- a/perf/cairo-perf-micro.c +++ b/perf/cairo-perf-micro.c @@ -62,63 +62,6 @@ typedef struct _cairo_perf_case { const cairo_perf_case_t perf_cases[]; -/* Some targets just aren't that interesting for performance testing, - * (not least because many of these surface types use a recording-surface - * and as such defer the "real" rendering to later, so our timing - * loops wouldn't count the real work, just the recording by the - * recording-surface. */ -static cairo_bool_t -target_is_measurable (const cairo_boilerplate_target_t *target) -{ - switch ((int) target->expected_type) { - case CAIRO_SURFACE_TYPE_IMAGE: - if (strcmp (target->name, "pdf") == 0 || - strcmp (target->name, "ps") == 0) - { - return FALSE; - } - else - { - return TRUE; - } - case CAIRO_SURFACE_TYPE_XLIB: - if (strcmp (target->name, "xlib-fallback") == 0 || - strcmp (target->name, "xlib-reference") == 0) - { - return FALSE; - } - else - { - return TRUE; - } - case CAIRO_SURFACE_TYPE_XCB: - case CAIRO_SURFACE_TYPE_GLITZ: - case CAIRO_SURFACE_TYPE_QUARTZ: - case CAIRO_SURFACE_TYPE_WIN32: - case CAIRO_SURFACE_TYPE_BEOS: - case CAIRO_SURFACE_TYPE_DIRECTFB: -#if CAIRO_VERSION > CAIRO_VERSION_ENCODE(1,1,2) - case CAIRO_SURFACE_TYPE_OS2: -#endif -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,9,4) - case CAIRO_SURFACE_TYPE_QT: -#endif -#if CAIRO_HAS_GL_SURFACE - case CAIRO_SURFACE_TYPE_GL: -#endif -#if CAIRO_HAS_DRM_SURFACE - case CAIRO_SURFACE_TYPE_DRM: -#endif -#if CAIRO_HAS_SKIA_SURFACE - case CAIRO_SURFACE_TYPE_SKIA: -#endif - return TRUE; - - default: - return FALSE; - } -} - static const char * _content_to_string (cairo_content_t content, cairo_bool_t similar) { @@ -514,7 +457,7 @@ main (int argc, char *argv[]) for (i = 0; i < perf.num_targets; i++) { const cairo_boilerplate_target_t *target = perf.targets[i]; - if (! target_is_measurable (target)) + if (! target->is_measurable) continue; perf.target = target; diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c index 88c797b6..a87ef337 100644 --- a/perf/cairo-perf-trace.c +++ b/perf/cairo-perf-trace.c @@ -68,71 +68,6 @@ #define CAIRO_PERF_MIN_STD_DEV_COUNT 3 #define CAIRO_PERF_STABLE_STD_DEV_COUNT 3 -/* Some targets just aren't that interesting for performance testing, - * (not least because many of these surface types use a recording-surface - * and as such defer the "real" rendering to later, so our timing - * loops wouldn't count the real work, just the recording by the - * recording-surface. */ -static cairo_bool_t -target_is_measurable (const cairo_boilerplate_target_t *target) -{ - if (target->content != CAIRO_CONTENT_COLOR_ALPHA) - return FALSE; - - switch ((int) target->expected_type) { - case CAIRO_SURFACE_TYPE_IMAGE: - if (strcmp (target->name, "pdf") == 0 || - strcmp (target->name, "ps") == 0) - { - return FALSE; - } - else - { - return TRUE; - } - case CAIRO_SURFACE_TYPE_XLIB: - if (strcmp (target->name, "xlib-fallback") == 0 || - strcmp (target->name, "xlib-reference") == 0) - { - return FALSE; - } - else - { - return TRUE; - } - case CAIRO_SURFACE_TYPE_XCB: - case CAIRO_SURFACE_TYPE_GLITZ: - case CAIRO_SURFACE_TYPE_QUARTZ: - case CAIRO_SURFACE_TYPE_WIN32: - case CAIRO_SURFACE_TYPE_BEOS: - case CAIRO_SURFACE_TYPE_DIRECTFB: -#if CAIRO_VERSION > CAIRO_VERSION_ENCODE(1,1,2) - case CAIRO_SURFACE_TYPE_OS2: -#endif -#if CAIRO_HAS_QT_SURFACE - case CAIRO_SURFACE_TYPE_QT: -#endif -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,9,3) - case CAIRO_INTERNAL_SURFACE_TYPE_NULL: -#endif -#if CAIRO_HAS_GL_SURFACE - case CAIRO_SURFACE_TYPE_GL: -#endif -#if CAIRO_HAS_DRM_SURFACE - case CAIRO_SURFACE_TYPE_DRM: -#endif -#if CAIRO_HAS_SKIA_SURFACE - case CAIRO_SURFACE_TYPE_SKIA: -#endif - return TRUE; - case CAIRO_SURFACE_TYPE_PDF: - case CAIRO_SURFACE_TYPE_PS: - case CAIRO_SURFACE_TYPE_SVG: - default: - return FALSE; - } -} - cairo_bool_t cairo_perf_can_run (cairo_perf_t *perf, const char *name, @@ -848,7 +783,7 @@ main (int argc, char *argv[]) for (i = 0; i < perf.num_targets; i++) { const cairo_boilerplate_target_t *target = perf.targets[i]; - if (! perf.list_only && ! target_is_measurable (target)) + if (! perf.list_only && ! target->is_measurable) continue; perf.target = target; |