diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-06-14 09:17:41 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-06-14 09:17:41 +0200 |
commit | 728b3091c142e918935200adcd4facfec7ccd515 (patch) | |
tree | e7375cef54ef817fc3f310c2c27136d2edb104aa /perf | |
parent | 6af97522e5d98cd4618838be94635cf3d4559cb3 (diff) |
Import upstream version 1.9.8
Diffstat (limited to 'perf')
33 files changed, 274 insertions, 253 deletions
diff --git a/perf/Makefile.am b/perf/Makefile.am index 441aee6..6a1b72c 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -138,11 +138,6 @@ ITERS = $(CAIRO_PERF_ITERATIONS) CAIRO_PERF_ENVIRONMENT = CAIRO_PERF_ITERATIONS="$(ITERS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" -# Cap the maximum number of iterations during 'make check' -TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10" - -TESTS += cairo-perf-micro$(EXEEXT) - perf: cairo-perf-micro$(EXEEXT) cairo-perf-trace$(EXEEXT) -$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-micro$(EXEEXT) -$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-trace$(EXEEXT) @@ -170,19 +165,17 @@ CLEANFILES += \ callgrind.out.* \ index.html -check-valgrind perf-valgrind: - $(MAKE) $(AM_MAKEFLAGS) check \ - TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \ +perf-valgrind: + $(MAKE) $(AM_MAKEFLAGS) perf \ $(top_builddir)/libtool --mode=execute \ valgrind $(VALGRIND_MEMCHECK_FLAGS) $(EXTRA_VALGRIND_FLAGS)' \ | tee valgrind-log perf-callgrind: - $(MAKE) $(AM_MAKEFLAGS) check \ - TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \ + $(MAKE) $(AM_MAKEFLAGS) perf \ $(top_builddir)/libtool --mode=execute \ valgrind $(VALGRIND_CALLGRIND_FLAGS) $(EXTRA_VALGRIND_FLAGS)' -.PHONY: perf check-valgrind perf-valgrind perf-callgrind +.PHONY: perf perf-valgrind perf-callgrind EXTRA_DIST += Makefile.win32 diff --git a/perf/Makefile.in b/perf/Makefile.in index c4e6294..c6fcb1c 100644 --- a/perf/Makefile.in +++ b/perf/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -39,6 +39,7 @@ EXTRA_PROGRAMS = cairo-perf-micro$(EXEEXT) cairo-perf-trace$(EXEEXT) \ cairo-perf-diff-files$(EXEEXT) cairo-perf-print$(EXEEXT) \ cairo-perf-chart$(EXEEXT) cairo-perf-compare-backends$(EXEEXT) \ cairo-perf-graph-files$(EXEEXT) +TESTS = check_PROGRAMS = @CAIRO_HAS_WIN32_SURFACE_TRUE@am__append_1 = cairo-perf-win32.c @CAIRO_HAS_OS2_SURFACE_TRUE@@CAIRO_HAS_WIN32_SURFACE_FALSE@am__append_2 = cairo-perf-os2.c @@ -57,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/build/aclocal.cairo.m4 \ $(top_srcdir)/build/aclocal.makefile.m4 \ $(top_srcdir)/build/aclocal.pkg.m4 \ $(top_srcdir)/build/aclocal.shave.m4 \ + $(top_srcdir)/build/ax-pthread.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ @@ -290,6 +292,9 @@ PKGCONFIG_REQUIRES = @PKGCONFIG_REQUIRES@ PKG_CONFIG = @PKG_CONFIG@ POPPLER_CFLAGS = @POPPLER_CFLAGS@ POPPLER_LIBS = @POPPLER_LIBS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ Q = @Q@ RANLIB = @RANLIB@ SED = @SED@ @@ -321,6 +326,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -335,7 +341,11 @@ directfb_LIBS = @directfb_LIBS@ docdir = @docdir@ drm_CFLAGS = @drm_CFLAGS@ drm_LIBS = @drm_LIBS@ +drm_xr_CFLAGS = @drm_xr_CFLAGS@ +drm_xr_LIBS = @drm_xr_LIBS@ dvidir = @dvidir@ +egl_CFLAGS = @egl_CFLAGS@ +egl_LIBS = @egl_LIBS@ exec_prefix = @exec_prefix@ gallium_DIR = @gallium_DIR@ gl_CFLAGS = @gl_CFLAGS@ @@ -371,15 +381,12 @@ png_REQUIRES = @png_REQUIRES@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -pthread_CFLAGS = @pthread_CFLAGS@ -pthread_LIBS = @pthread_LIBS@ qt_CFLAGS = @qt_CFLAGS@ qt_LIBS = @qt_LIBS@ -real_pthread_CFLAGS = @real_pthread_CFLAGS@ -real_pthread_LIBS = @real_pthread_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shavedir = @shavedir@ +shm_LIBS = @shm_LIBS@ skia_DIR = @skia_DIR@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ @@ -406,7 +413,6 @@ DISTCLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = cairo-perf-diff COPYING Makefile.win32 EXTRA_LTLIBRARIES = libcairoperf.la MAINTAINERCLEANFILES = Makefile.in -TESTS = cairo-perf-micro$(EXEEXT) AM_CPPFLAGS = \ -I$(srcdir) \ -I$(top_srcdir)/boilerplate \ @@ -484,9 +490,6 @@ TARGETS = $(CAIRO_TEST_TARGET) TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE) ITERS = $(CAIRO_PERF_ITERATIONS) CAIRO_PERF_ENVIRONMENT = CAIRO_PERF_ITERATIONS="$(ITERS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" - -# Cap the maximum number of iterations during 'make check' -TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10" EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS) VALGRIND_MEMCHECK_FLAGS = \ --tool=memcheck \ @@ -1368,20 +1371,18 @@ perf-commit.html : cairo-perf-micro${EXEEXT} index.html: perf-tag.html perf-commit.html echo "<html><head><title>Performance Changes</title></head><body>Against <a href=\"perf-tag.html\">"`git describe --abbrev=0`"</a><br><a href=\"perf-commit.html\">Latest commit</a></body>" > $@ -check-valgrind perf-valgrind: - $(MAKE) $(AM_MAKEFLAGS) check \ - TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \ +perf-valgrind: + $(MAKE) $(AM_MAKEFLAGS) perf \ $(top_builddir)/libtool --mode=execute \ valgrind $(VALGRIND_MEMCHECK_FLAGS) $(EXTRA_VALGRIND_FLAGS)' \ | tee valgrind-log perf-callgrind: - $(MAKE) $(AM_MAKEFLAGS) check \ - TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \ + $(MAKE) $(AM_MAKEFLAGS) perf \ $(top_builddir)/libtool --mode=execute \ valgrind $(VALGRIND_CALLGRIND_FLAGS) $(EXTRA_VALGRIND_FLAGS)' -.PHONY: perf check-valgrind perf-valgrind perf-callgrind +.PHONY: perf perf-valgrind perf-callgrind # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/perf/cairo-perf-diff b/perf/cairo-perf-diff index 436f149..5a4b7b3 100755 --- a/perf/cairo-perf-diff +++ b/perf/cairo-perf-diff @@ -52,14 +52,14 @@ END exit 1 } -benchmarks="cairo-perf-micro" +benchmark="cairo-perf-micro" # First, pull off any known options while true; do case $1 in -f|--force) force_cairo_perf="true";; -h|--html) html_output="$2"; shift ;; - -t|--trace) benchmarks="${benchmarks} cairo-perf-trace";; + -t|--trace) benchmark="cairo-perf-trace";; *) break;; esac @@ -178,7 +178,7 @@ build() { (cd boilerplate && make libcairoboilerplate.la) cd perf - make cairo-perf cairo-perf-trace + make ${benchmark} } # Usage: run_cairo_perf_if_not_cached <rev> <suffix> @@ -214,9 +214,7 @@ run_cairo_perf_if_not_cached() { } echo "Running \"cairo-perf $CAIRO_PERF_OPTIONS\" against $rev. Results will be cached in:" - for cmd in $benchmarks; do - (./$cmd $CAIRO_PERF_OPTIONS || echo "*** Performance test crashed") >> $perf - done + { ./$benchmark $CAIRO_PERF_OPTIONS || echo "*** Performance test crashed"; } >> $perf cd $owd } diff --git a/perf/cairo-perf-micro.c b/perf/cairo-perf-micro.c index 44ed209..e8b2820 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) { @@ -187,14 +130,16 @@ cairo_perf_calibrate (cairo_perf_t *perf, cairo_perf_ticks_t calibration0, calibration; unsigned loops, min_loops; - calibration0 = perf_func (perf->cr, perf->size, perf->size, 1); + min_loops = 1; + calibration0 = perf_func (perf->cr, perf->size, perf->size, min_loops); if (perf->fast_and_sloppy) { calibration = calibration0; } else { - loops = cairo_perf_ticks_per_second () / 100 / calibration0; - if (loops < 3) - loops = 3; - calibration = (calibration0 + perf_func (perf->cr, perf->size, perf->size, loops)) / (loops + 1); + calibration = 0.01 * cairo_perf_ticks_per_second (); + while (calibration0 < calibration) { + min_loops *= 10; + calibration0 = perf_func (perf->cr, perf->size, perf->size, min_loops); + } } /* XXX @@ -208,7 +153,7 @@ cairo_perf_calibrate (cairo_perf_t *perf, * a more rigorous analysis of the synchronisation overhead, * that is to estimate the time for loop=0. */ - loops = perf->ms_per_iteration * 0.001 * cairo_perf_ticks_per_second () / calibration; + loops = perf->ms_per_iteration * 0.001 * cairo_perf_ticks_per_second () * min_loops / calibration; min_loops = perf->fast_and_sloppy ? 1 : 10; if (loops < min_loops) loops = min_loops; @@ -219,7 +164,8 @@ cairo_perf_calibrate (cairo_perf_t *perf, void cairo_perf_run (cairo_perf_t *perf, const char *name, - cairo_perf_func_t perf_func) + cairo_perf_func_t perf_func, + cairo_count_func_t count_func) { static cairo_bool_t first_run = TRUE; unsigned int i, similar, has_similar; @@ -313,8 +259,7 @@ cairo_perf_run (cairo_perf_t *perf, if (i > 0) { _cairo_stats_compute (&stats, times, i+1); - if (stats.std_dev <= CAIRO_PERF_LOW_STD_DEV) - { + if (stats.std_dev <= CAIRO_PERF_LOW_STD_DEV) { low_std_dev_count++; if (low_std_dev_count >= CAIRO_PERF_STABLE_STD_DEV_COUNT) break; @@ -330,12 +275,23 @@ cairo_perf_run (cairo_perf_t *perf, if (perf->summary) { _cairo_stats_compute (&stats, times, i); - fprintf (perf->summary, - "%10lld %#8.3f %#8.3f %#5.2f%% %3d\n", - (long long) stats.min_ticks, - (stats.min_ticks * 1000.0) / cairo_perf_ticks_per_second (), - (stats.median_ticks * 1000.0) / cairo_perf_ticks_per_second (), - stats.std_dev * 100.0, stats.iterations); + if (count_func != NULL) { + double count = count_func (perf->cr, perf->size, perf->size); + fprintf (perf->summary, + "%10lld %#8.3f %#8.3f %#5.2f%% %3d: %.2f\n", + (long long) stats.min_ticks, + (stats.min_ticks * 1000.0) / cairo_perf_ticks_per_second (), + (stats.median_ticks * 1000.0) / cairo_perf_ticks_per_second (), + stats.std_dev * 100.0, stats.iterations, + count * cairo_perf_ticks_per_second () / stats.min_ticks); + } else { + fprintf (perf->summary, + "%10lld %#8.3f %#8.3f %#5.2f%% %3d\n", + (long long) stats.min_ticks, + (stats.min_ticks * 1000.0) / cairo_perf_ticks_per_second (), + (stats.median_ticks * 1000.0) / cairo_perf_ticks_per_second (), + stats.std_dev * 100.0, stats.iterations); + } fflush (perf->summary); } @@ -476,6 +432,8 @@ static void cairo_perf_fini (cairo_perf_t *perf) { cairo_boilerplate_free_targets (perf->targets); + cairo_boilerplate_fini (); + free (perf->times); cairo_debug_reset_static_data (); #if HAVE_FCFINI @@ -512,7 +470,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; @@ -572,8 +530,8 @@ const cairo_perf_case_t perf_cases[] = { { fill, 64, 512}, { stroke, 64, 512}, { text, 64, 512}, - { glyphs, 64, 512}, - { mask, 64, 512}, + { glyphs, 64, 512}, + { mask, 64, 512}, { tessellate, 100, 100}, { subimage_copy, 16, 512}, { pattern_create_radial, 16, 16}, diff --git a/perf/cairo-perf-posix.c b/perf/cairo-perf-posix.c index 68b78d0..50a415d 100644 --- a/perf/cairo-perf-posix.c +++ b/perf/cairo-perf-posix.c @@ -132,6 +132,13 @@ oil_profile_stamp_s390(void) #endif #endif +#if defined(__APPLE__) +#include <mach/mach_time.h> +#undef OIL_STAMP +#define OIL_STAMP mach_absolute_time +#endif + + typedef struct _cairo_perf_timer { #if defined(CLOCK) struct timespec tv_start; diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c index 5487eaf..a87ef33 100644 --- a/perf/cairo-perf-trace.c +++ b/perf/cairo-perf-trace.c @@ -53,6 +53,10 @@ #include <sys/stat.h> #include <dirent.h> +#if HAVE_UNISTD_H +#include <unistd.h> +#endif + #include <signal.h> #if HAVE_FCFINI @@ -64,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, @@ -671,8 +610,10 @@ parse_options (cairo_perf_t *perf, int argc, char *argv[]) if (verbose && perf->summary == NULL) perf->summary = stderr; +#if HAVE_UNISTD_H if (perf->summary && isatty (fileno (perf->summary))) perf->summary_continuous = TRUE; +#endif if (optind < argc) { perf->names = &argv[optind]; @@ -687,6 +628,8 @@ static void cairo_perf_fini (cairo_perf_t *perf) { cairo_boilerplate_free_targets (perf->targets); + cairo_boilerplate_fini (); + free (perf->times); cairo_debug_reset_static_data (); #if HAVE_FCFINI @@ -702,9 +645,11 @@ have_trace_filenames (cairo_perf_t *perf) if (perf->num_names == 0) return FALSE; +#if HAVE_UNISTD_H for (i = 0; i < perf->num_names; i++) if (access (perf->names[i], R_OK) == 0) return TRUE; +#endif return FALSE; } @@ -838,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; diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h index 6d1741a..c4eeb16 100644 --- a/perf/cairo-perf.h +++ b/perf/cairo-perf.h @@ -99,6 +99,9 @@ typedef struct _cairo_perf { typedef cairo_perf_ticks_t (*cairo_perf_func_t) (cairo_t *cr, int width, int height, int loops); +typedef double +(*cairo_count_func_t) (cairo_t *cr, int width, int height); + cairo_bool_t cairo_perf_can_run (cairo_perf_t *perf, const char *name, @@ -107,12 +110,14 @@ cairo_perf_can_run (cairo_perf_t *perf, void cairo_perf_run (cairo_perf_t *perf, const char *name, - cairo_perf_func_t perf_func); + cairo_perf_func_t perf_func, + cairo_count_func_t count_func); void cairo_perf_cover_sources_and_operators (cairo_perf_t *perf, const char *name, - cairo_perf_func_t perf_func); + cairo_perf_func_t perf_func, + cairo_count_func_t count_func); /* reporter convenience routines */ diff --git a/perf/micro/box-outline.c b/perf/micro/box-outline.c index e216b79..fe0719f 100644 --- a/perf/micro/box-outline.c +++ b/perf/micro/box-outline.c @@ -97,6 +97,6 @@ box_outline (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "box-outline", NULL)) return; - cairo_perf_run (perf, "box-outline-stroke", box_outline_stroke); - cairo_perf_run (perf, "box-outline-fill", box_outline_fill); + cairo_perf_run (perf, "box-outline-stroke", box_outline_stroke, NULL); + cairo_perf_run (perf, "box-outline-fill", box_outline_fill, NULL); } diff --git a/perf/micro/cairo-perf-cover.c b/perf/micro/cairo-perf-cover.c index 48f13a8..151a2e6 100644 --- a/perf/micro/cairo-perf-cover.c +++ b/perf/micro/cairo-perf-cover.c @@ -295,7 +295,8 @@ typedef void (*set_source_func_t) (cairo_t *cr, int width, int height); void cairo_perf_cover_sources_and_operators (cairo_perf_t *perf, const char *name, - cairo_perf_func_t perf_func) + cairo_perf_func_t perf_func, + cairo_count_func_t count_func) { unsigned int i, j; char *expanded_name; @@ -332,7 +333,7 @@ cairo_perf_cover_sources_and_operators (cairo_perf_t *perf, xasprintf (&expanded_name, "%s_%s_%s", name, sources[i].name, operators[j].name); - cairo_perf_run (perf, expanded_name, perf_func); + cairo_perf_run (perf, expanded_name, perf_func, count_func); free (expanded_name); } } diff --git a/perf/micro/composite-checker.c b/perf/micro/composite-checker.c index 0e61ec8..27dc364 100644 --- a/perf/micro/composite-checker.c +++ b/perf/micro/composite-checker.c @@ -107,7 +107,7 @@ composite_checker (cairo_perf_t *perf, cairo_pattern_set_filter (src_pattern, CAIRO_FILTER_NEAREST); cairo_surface_destroy (image); - cairo_perf_run (perf, "composite-checker", do_composite_checker); + cairo_perf_run (perf, "composite-checker", do_composite_checker, NULL); cairo_pattern_destroy (checkerboard); cairo_pattern_destroy (src_pattern); diff --git a/perf/micro/dragon.c b/perf/micro/dragon.c index eb8251c..78da5b2 100644 --- a/perf/micro/dragon.c +++ b/perf/micro/dragon.c @@ -241,9 +241,9 @@ dragon (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "dragon", NULL)) return; - cairo_perf_run (perf, "dragon-solid", do_dragon_solid); - cairo_perf_run (perf, "dragon-solid-aligned-clip", do_dragon_solid_aligned_clip); - cairo_perf_run (perf, "dragon-solid-unaligned-clip", do_dragon_solid_unaligned_clip); - cairo_perf_run (perf, "dragon-solid-circle-clip", do_dragon_solid_circle_clip); - cairo_perf_run (perf, "dragon", do_dragon); + cairo_perf_run (perf, "dragon-solid", do_dragon_solid, NULL); + cairo_perf_run (perf, "dragon-solid-aligned-clip", do_dragon_solid_aligned_clip, NULL); + cairo_perf_run (perf, "dragon-solid-unaligned-clip", do_dragon_solid_unaligned_clip, NULL); + cairo_perf_run (perf, "dragon-solid-circle-clip", do_dragon_solid_circle_clip, NULL); + cairo_perf_run (perf, "dragon", do_dragon, NULL); } diff --git a/perf/micro/fill.c b/perf/micro/fill.c index c65a649..a11298f 100644 --- a/perf/micro/fill.c +++ b/perf/micro/fill.c @@ -113,7 +113,7 @@ fill (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "fill", NULL)) return; - cairo_perf_cover_sources_and_operators (perf, "fill", do_fill); - cairo_perf_cover_sources_and_operators (perf, "fill-annuli", do_fill_annuli); - cairo_perf_cover_sources_and_operators (perf, "fill-eo-noaa", do_fill_eo_noaa); + cairo_perf_cover_sources_and_operators (perf, "fill", do_fill, NULL); + cairo_perf_cover_sources_and_operators (perf, "fill-annuli", do_fill_annuli, NULL); + cairo_perf_cover_sources_and_operators (perf, "fill-eo-noaa", do_fill_eo_noaa, NULL); } diff --git a/perf/micro/glyphs.c b/perf/micro/glyphs.c index 25175d5..ae70a8e 100644 --- a/perf/micro/glyphs.c +++ b/perf/micro/glyphs.c @@ -28,17 +28,29 @@ #include "cairo-perf.h" static cairo_perf_ticks_t -do_glyphs (cairo_t *cr, int width, int height, int loops) +do_glyphs (double font_size, + cairo_antialias_t antialias, + cairo_t *cr, int width, int height, int loops) { const char text[] = "the jay, pig, fox, zebra and my wolves quack"; cairo_scaled_font_t *scaled_font; cairo_glyph_t *glyphs = NULL, *glyphs_copy; cairo_text_extents_t extents; + cairo_font_options_t *options; cairo_status_t status; double x, y; int num_glyphs, n; - cairo_set_font_size (cr, 9); + options = cairo_font_options_create (); + cairo_font_options_set_antialias (options, antialias); + cairo_set_font_options (cr, options); + cairo_font_options_destroy (options); + + cairo_select_font_face (cr, + "@cairo:", + CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_NORMAL); + cairo_set_font_size (cr, font_size); scaled_font = cairo_get_scaled_font (cr); status = cairo_scaled_font_text_to_glyphs (scaled_font, 0., 0., text, -1, @@ -57,11 +69,11 @@ do_glyphs (cairo_t *cr, int width, int height, int loops) cairo_scaled_font_glyph_extents (scaled_font, glyphs, num_glyphs, &extents); - y = 0; cairo_perf_timer_start (); while (loops--) { + y = 0; do { x = 0; do { @@ -71,15 +83,12 @@ do_glyphs (cairo_t *cr, int width, int height, int loops) glyphs_copy[n].y += y; } cairo_show_glyphs (cr, glyphs_copy, num_glyphs); - if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) - goto out; x += extents.width; } while (x < width); y += extents.height; } while (y < height); } -out: cairo_perf_timer_stop (); @@ -89,11 +98,102 @@ out: return cairo_perf_timer_elapsed (); } +static double +count_glyphs (double font_size, + cairo_antialias_t antialias, + cairo_t *cr, int width, int height) +{ + const char text[] = "the jay, pig, fox, zebra and my wolves quack"; + cairo_scaled_font_t *scaled_font; + cairo_glyph_t *glyphs = NULL; + cairo_text_extents_t extents; + cairo_font_options_t *options; + cairo_status_t status; + int num_glyphs; + int glyphs_per_line, lines_per_loop; + + options = cairo_font_options_create (); + cairo_font_options_set_antialias (options, antialias); + cairo_set_font_options (cr, options); + cairo_font_options_destroy (options); + + cairo_select_font_face (cr, + "@cairo:", + CAIRO_FONT_SLANT_NORMAL, + CAIRO_FONT_WEIGHT_NORMAL); + cairo_set_font_size (cr, font_size); + scaled_font = cairo_get_scaled_font (cr); + status = cairo_scaled_font_text_to_glyphs (scaled_font, 0., 0., + text, -1, + &glyphs, &num_glyphs, + NULL, NULL, + NULL); + if (status) + return 0; + + cairo_scaled_font_glyph_extents (scaled_font, + glyphs, num_glyphs, + &extents); + cairo_glyph_free (glyphs); + + glyphs_per_line = num_glyphs * width / extents.width + 1; + lines_per_loop = height / extents.height + 1; + return glyphs_per_line * lines_per_loop / 1000.; /* kiloglyphs */ +} + +#define DECL(name,size, aa) \ +static cairo_perf_ticks_t \ +do_glyphs##name (cairo_t *cr, int width, int height, int loops) \ +{ \ + return do_glyphs (size, aa, cr, width, height, loops); \ +} \ +\ +static double \ +count_glyphs##name (cairo_t *cr, int width, int height) \ +{ \ + return count_glyphs (size, aa, cr, width, height); \ +} + +DECL(8, 8, CAIRO_ANTIALIAS_GRAY) +DECL(10, 10, CAIRO_ANTIALIAS_GRAY) +DECL(12, 12, CAIRO_ANTIALIAS_GRAY) +DECL(16, 16, CAIRO_ANTIALIAS_GRAY) +DECL(20, 20, CAIRO_ANTIALIAS_GRAY) +DECL(24, 24, CAIRO_ANTIALIAS_GRAY) +DECL(32, 32, CAIRO_ANTIALIAS_GRAY) +DECL(40, 40, CAIRO_ANTIALIAS_GRAY) +DECL(48, 48, CAIRO_ANTIALIAS_GRAY) + +DECL(8ca, 8, CAIRO_ANTIALIAS_SUBPIXEL) +DECL(48ca, 48, CAIRO_ANTIALIAS_SUBPIXEL) + +DECL(8mono, 8, CAIRO_ANTIALIAS_NONE) +DECL(48mono, 48, CAIRO_ANTIALIAS_NONE) + void glyphs (cairo_perf_t *perf, cairo_t *cr, int width, int height) { if (! cairo_perf_can_run (perf, "glyphs", NULL)) return; - cairo_perf_cover_sources_and_operators (perf, "glyphs", do_glyphs); + cairo_perf_cover_sources_and_operators (perf, "glyphs8mono", do_glyphs8mono, count_glyphs8mono); + cairo_perf_cover_sources_and_operators (perf, "glyphs8", do_glyphs8, count_glyphs8); + cairo_perf_cover_sources_and_operators (perf, "glyphs8ca", do_glyphs8ca, count_glyphs8ca); + + cairo_set_operator (cr, CAIRO_OPERATOR_OVER); + cairo_set_source_rgb (cr, 0, 0, 0); + + cairo_perf_run (perf, "glyphs8", do_glyphs8, count_glyphs8); + cairo_perf_run (perf, "glyphs10", do_glyphs10, count_glyphs10); + cairo_perf_run (perf, "glyphs12", do_glyphs12, count_glyphs12); + cairo_perf_run (perf, "glyphs16", do_glyphs16, count_glyphs16); + cairo_perf_run (perf, "glyphs20", do_glyphs20, count_glyphs20); + cairo_perf_run (perf, "glyphs24", do_glyphs24, count_glyphs24); + cairo_perf_run (perf, "glyphs32", do_glyphs32, count_glyphs32); + cairo_perf_run (perf, "glyphs40", do_glyphs40, count_glyphs40); + cairo_perf_run (perf, "glyphs48", do_glyphs48, count_glyphs48); + + cairo_perf_cover_sources_and_operators (perf, "glyphs48mono", do_glyphs48mono, count_glyphs48mono); + cairo_perf_cover_sources_and_operators (perf, "glyphs48", do_glyphs48, count_glyphs48); + cairo_perf_cover_sources_and_operators (perf, "glyphs48ca", do_glyphs48ca, count_glyphs48ca); } diff --git a/perf/micro/intersections.c b/perf/micro/intersections.c index 0418ee3..8f55165 100644 --- a/perf/micro/intersections.c +++ b/perf/micro/intersections.c @@ -149,9 +149,9 @@ intersections (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "intersections", NULL)) return; - cairo_perf_run (perf, "intersections-nz-fill", random_nz); - cairo_perf_run (perf, "intersections-eo-fill", random_eo); + cairo_perf_run (perf, "intersections-nz-fill", random_nz, NULL); + cairo_perf_run (perf, "intersections-eo-fill", random_eo, NULL); - cairo_perf_run (perf, "intersections-nz-curve-fill", random_curve_nz); - cairo_perf_run (perf, "intersections-eo-curve-fill", random_curve_eo); + cairo_perf_run (perf, "intersections-nz-curve-fill", random_curve_nz, NULL); + cairo_perf_run (perf, "intersections-eo-curve-fill", random_curve_eo, NULL); } diff --git a/perf/micro/long-dashed-lines.c b/perf/micro/long-dashed-lines.c index c4de24f..74de158 100644 --- a/perf/micro/long-dashed-lines.c +++ b/perf/micro/long-dashed-lines.c @@ -67,5 +67,5 @@ long_dashed_lines (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "long-dashed-lines", NULL)) return; - cairo_perf_run (perf, "long-dashed-lines", do_long_dashed_lines); + cairo_perf_run (perf, "long-dashed-lines", do_long_dashed_lines, NULL); } diff --git a/perf/micro/long-lines.c b/perf/micro/long-lines.c index 2b72879..577f17c 100644 --- a/perf/micro/long-lines.c +++ b/perf/micro/long-lines.c @@ -138,8 +138,8 @@ long_lines (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "long-lines", NULL)) return; - cairo_perf_run (perf, "long-lines-uncropped", long_lines_uncropped); - cairo_perf_run (perf, "long-lines-uncropped-once", long_lines_uncropped_once); - cairo_perf_run (perf, "long-lines-cropped", long_lines_cropped); - cairo_perf_run (perf, "long-lines-cropped-once", long_lines_cropped_once); + cairo_perf_run (perf, "long-lines-uncropped", long_lines_uncropped, NULL); + cairo_perf_run (perf, "long-lines-uncropped-once", long_lines_uncropped_once, NULL); + cairo_perf_run (perf, "long-lines-cropped", long_lines_cropped, NULL); + cairo_perf_run (perf, "long-lines-cropped-once", long_lines_cropped_once, NULL); } diff --git a/perf/micro/mask.c b/perf/micro/mask.c index 3050b44..840d43f 100644 --- a/perf/micro/mask.c +++ b/perf/micro/mask.c @@ -279,21 +279,21 @@ mask (cairo_perf_t *perf, cairo_t *cr, int width, int height) return; cairo_perf_cover_sources_and_operators (perf, "mask-solid", - do_mask_solid); + do_mask_solid, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-image", - do_mask_image); + do_mask_image, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-image-half", - do_mask_image_half); + do_mask_image_half, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-image-double", - do_mask_image_double); + do_mask_image_double, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-similar", - do_mask_similar); + do_mask_similar, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-similar-half", - do_mask_similar_half); + do_mask_similar_half, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-similar-double", - do_mask_similar_double); + do_mask_similar_double, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-linear", - do_mask_linear); + do_mask_linear, NULL); cairo_perf_cover_sources_and_operators (perf, "mask-radial", - do_mask_radial); + do_mask_radial, NULL); } diff --git a/perf/micro/mosaic.c b/perf/micro/mosaic.c index b762105..a63166c 100644 --- a/perf/micro/mosaic.c +++ b/perf/micro/mosaic.c @@ -166,8 +166,8 @@ mosaic (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "mosaic", NULL)) return; - cairo_perf_run (perf, "mosaic-fill-curves", mosaic_fill_curves); - cairo_perf_run (perf, "mosaic-fill-lines", mosaic_fill_lines); - cairo_perf_run (perf, "mosaic-tessellate-curves", mosaic_tessellate_curves); - cairo_perf_run (perf, "mosaic-tessellate-lines", mosaic_tessellate_lines); + cairo_perf_run (perf, "mosaic-fill-curves", mosaic_fill_curves, NULL); + cairo_perf_run (perf, "mosaic-fill-lines", mosaic_fill_lines, NULL); + cairo_perf_run (perf, "mosaic-tessellate-curves", mosaic_tessellate_curves, NULL); + cairo_perf_run (perf, "mosaic-tessellate-lines", mosaic_tessellate_lines, NULL); } diff --git a/perf/micro/paint-with-alpha.c b/perf/micro/paint-with-alpha.c index 5c23fe4..051d653 100644 --- a/perf/micro/paint-with-alpha.c +++ b/perf/micro/paint-with-alpha.c @@ -38,6 +38,12 @@ do_paint_with_alpha (cairo_t *cr, int width, int height, int loops) return cairo_perf_timer_elapsed (); } +static double +count_paint_with_alpha (cairo_t *cr, int width, int height) +{ + return width * height / 1e6; /* Mpix/s */ +} + void paint_with_alpha (cairo_perf_t *perf, cairo_t *cr, int width, int height) { @@ -45,5 +51,6 @@ paint_with_alpha (cairo_perf_t *perf, cairo_t *cr, int width, int height) return; cairo_perf_cover_sources_and_operators (perf, "paint-with-alpha", - do_paint_with_alpha); + do_paint_with_alpha, + count_paint_with_alpha); } diff --git a/perf/micro/paint.c b/perf/micro/paint.c index bdc014c..1ba108f 100644 --- a/perf/micro/paint.c +++ b/perf/micro/paint.c @@ -38,11 +38,17 @@ do_paint (cairo_t *cr, int width, int height, int loops) return cairo_perf_timer_elapsed (); } +static double +count_paint (cairo_t *cr, int width, int height) +{ + return width * height / 1e6; /* Mpix/s */ +} + void paint (cairo_perf_t *perf, cairo_t *cr, int width, int height) { if (! cairo_perf_can_run (perf, "paint", NULL)) return; - cairo_perf_cover_sources_and_operators (perf, "paint", do_paint); + cairo_perf_cover_sources_and_operators (perf, "paint", do_paint, count_paint); } diff --git a/perf/micro/pattern_create_radial.c b/perf/micro/pattern_create_radial.c index 2959e74..7104c00 100644 --- a/perf/micro/pattern_create_radial.c +++ b/perf/micro/pattern_create_radial.c @@ -99,5 +99,5 @@ pattern_create_radial (cairo_perf_t *perf, cairo_t *cr, int width, int height) } cairo_perf_run (perf, "pattern-create-radial", - do_pattern_create_radial); + do_pattern_create_radial, NULL); } diff --git a/perf/micro/pythagoras-tree.c b/perf/micro/pythagoras-tree.c index f2200c9..964d5c1 100644 --- a/perf/micro/pythagoras-tree.c +++ b/perf/micro/pythagoras-tree.c @@ -87,5 +87,5 @@ pythagoras_tree (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "pythagoras-tree", NULL)) return; - cairo_perf_run (perf, "pythagoras-tree", do_pythagoras_tree); + cairo_perf_run (perf, "pythagoras-tree", do_pythagoras_tree, NULL); } diff --git a/perf/micro/rectangles.c b/perf/micro/rectangles.c index 601a0c5..6bfbc65 100644 --- a/perf/micro/rectangles.c +++ b/perf/micro/rectangles.c @@ -112,7 +112,7 @@ rectangles (cairo_perf_t *perf, cairo_t *cr, int width, int height) rects[i].height = (rand () % (height / 10)) + 1; } - MODE (perf, "one-rectangle", do_rectangle); - MODE (perf, "rectangles", do_rectangles); - MODE (perf, "rectangles-once", do_rectangles_once); + MODE (perf, "one-rectangle", do_rectangle, NULL); + MODE (perf, "rectangles", do_rectangles, NULL); + MODE (perf, "rectangles-once", do_rectangles_once, NULL); } diff --git a/perf/micro/rounded-rectangles.c b/perf/micro/rounded-rectangles.c index 477abf2..4db62fc 100644 --- a/perf/micro/rounded-rectangles.c +++ b/perf/micro/rounded-rectangles.c @@ -135,7 +135,7 @@ rounded_rectangles (cairo_perf_t *perf, cairo_t *cr, int width, int height) rects[i].height = (rand () % (height / 10)) + 1; } - MODE (perf, "one-rounded-rectangle", do_rectangle); - MODE (perf, "rounded-rectangles", do_rectangles); - MODE (perf, "rounded-rectangles-once", do_rectangles_once); + MODE (perf, "one-rounded-rectangle", do_rectangle, NULL); + MODE (perf, "rounded-rectangles", do_rectangles, NULL); + MODE (perf, "rounded-rectangles-once", do_rectangles_once, NULL); } diff --git a/perf/micro/spiral.c b/perf/micro/spiral.c index 046351c..10bb918 100644 --- a/perf/micro/spiral.c +++ b/perf/micro/spiral.c @@ -332,18 +332,18 @@ spiral (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "spiral", NULL)) return; - cairo_perf_run (perf, "spiral-box-nonalign-evenodd-fill", draw_spiral_eo_na_box); - cairo_perf_run (perf, "spiral-box-nonalign-nonzero-fill", draw_spiral_nz_na_box); - cairo_perf_run (perf, "spiral-box-pixalign-evenodd-fill", draw_spiral_eo_pa_box); - cairo_perf_run (perf, "spiral-box-pixalign-nonzero-fill", draw_spiral_nz_pa_box); - cairo_perf_run (perf, "spiral-diag-nonalign-evenodd-fill", draw_spiral_eo_na_di); - cairo_perf_run (perf, "spiral-diag-nonalign-nonzero-fill", draw_spiral_nz_na_di); - cairo_perf_run (perf, "spiral-diag-pixalign-evenodd-fill", draw_spiral_eo_pa_di); - cairo_perf_run (perf, "spiral-diag-pixalign-nonzero-fill", draw_spiral_nz_pa_di); - cairo_perf_run (perf, "spiral-rect-nonalign-evenodd-fill", draw_spiral_eo_na_re); - cairo_perf_run (perf, "spiral-rect-nonalign-nonzero-fill", draw_spiral_nz_na_re); - cairo_perf_run (perf, "spiral-rect-pixalign-evenodd-fill", draw_spiral_eo_pa_re); - cairo_perf_run (perf, "spiral-rect-pixalign-nonzero-fill", draw_spiral_nz_pa_re); - cairo_perf_run (perf, "spiral-nonalign-stroke", draw_spiral_stroke_na); - cairo_perf_run (perf, "spiral-pixalign-stroke", draw_spiral_stroke_pa); + cairo_perf_run (perf, "spiral-box-nonalign-evenodd-fill", draw_spiral_eo_na_box, NULL); + cairo_perf_run (perf, "spiral-box-nonalign-nonzero-fill", draw_spiral_nz_na_box, NULL); + cairo_perf_run (perf, "spiral-box-pixalign-evenodd-fill", draw_spiral_eo_pa_box, NULL); + cairo_perf_run (perf, "spiral-box-pixalign-nonzero-fill", draw_spiral_nz_pa_box, NULL); + cairo_perf_run (perf, "spiral-diag-nonalign-evenodd-fill", draw_spiral_eo_na_di, NULL); + cairo_perf_run (perf, "spiral-diag-nonalign-nonzero-fill", draw_spiral_nz_na_di, NULL); + cairo_perf_run (perf, "spiral-diag-pixalign-evenodd-fill", draw_spiral_eo_pa_di, NULL); + cairo_perf_run (perf, "spiral-diag-pixalign-nonzero-fill", draw_spiral_nz_pa_di, NULL); + cairo_perf_run (perf, "spiral-rect-nonalign-evenodd-fill", draw_spiral_eo_na_re, NULL); + cairo_perf_run (perf, "spiral-rect-nonalign-nonzero-fill", draw_spiral_nz_na_re, NULL); + cairo_perf_run (perf, "spiral-rect-pixalign-evenodd-fill", draw_spiral_eo_pa_re, NULL); + cairo_perf_run (perf, "spiral-rect-pixalign-nonzero-fill", draw_spiral_nz_pa_re, NULL); + cairo_perf_run (perf, "spiral-nonalign-stroke", draw_spiral_stroke_na, NULL); + cairo_perf_run (perf, "spiral-pixalign-stroke", draw_spiral_stroke_pa, NULL); } diff --git a/perf/micro/stroke.c b/perf/micro/stroke.c index 660dce5..950fb48 100644 --- a/perf/micro/stroke.c +++ b/perf/micro/stroke.c @@ -92,6 +92,6 @@ stroke (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "stroke", NULL)) return; - cairo_perf_cover_sources_and_operators (perf, "stroke", do_stroke); - cairo_perf_cover_sources_and_operators (perf, "strokes", do_strokes); + cairo_perf_cover_sources_and_operators (perf, "stroke", do_stroke, NULL); + cairo_perf_cover_sources_and_operators (perf, "strokes", do_strokes, NULL); } diff --git a/perf/micro/subimage_copy.c b/perf/micro/subimage_copy.c index 0bfad80..8c70464 100644 --- a/perf/micro/subimage_copy.c +++ b/perf/micro/subimage_copy.c @@ -73,5 +73,5 @@ subimage_copy (cairo_perf_t *perf, cairo_t *cr, int width, int height) cairo_set_source_surface (cr, image, 0, 0); cairo_surface_destroy (image); - cairo_perf_run (perf, "subimage-copy", do_subimage_copy); + cairo_perf_run (perf, "subimage-copy", do_subimage_copy, NULL); } diff --git a/perf/micro/tessellate.c b/perf/micro/tessellate.c index 9debc53..38effff 100644 --- a/perf/micro/tessellate.c +++ b/perf/micro/tessellate.c @@ -147,9 +147,9 @@ tessellate (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "tessellate", NULL)) return; - cairo_perf_run (perf, "tessellate-16", tessellate_16); - cairo_perf_run (perf, "tessellate-64", tessellate_64); - cairo_perf_run (perf, "tessellate-256", tessellate_256); + cairo_perf_run (perf, "tessellate-16", tessellate_16, NULL); + cairo_perf_run (perf, "tessellate-64", tessellate_64, NULL); + cairo_perf_run (perf, "tessellate-256", tessellate_256, NULL); } #if 0 diff --git a/perf/micro/text.c b/perf/micro/text.c index 827bb88..190c3c2 100644 --- a/perf/micro/text.c +++ b/perf/micro/text.c @@ -62,5 +62,5 @@ text (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "text", NULL)) return; - cairo_perf_cover_sources_and_operators (perf, "text", do_text); + cairo_perf_cover_sources_and_operators (perf, "text", do_text, NULL); } diff --git a/perf/micro/twin.c b/perf/micro/twin.c index b2c37a2..2bc01ed 100644 --- a/perf/micro/twin.c +++ b/perf/micro/twin.c @@ -52,5 +52,5 @@ twin (cairo_perf_t *perf, if (! cairo_perf_can_run (perf, "twin", NULL)) return; - cairo_perf_run (perf, "twin", do_twin); + cairo_perf_run (perf, "twin", do_twin, NULL); } diff --git a/perf/micro/unaligned-clip.c b/perf/micro/unaligned-clip.c index 284c832..adc44fe 100644 --- a/perf/micro/unaligned-clip.c +++ b/perf/micro/unaligned-clip.c @@ -66,5 +66,5 @@ unaligned_clip (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "unaligned-clip", NULL)) return; - cairo_perf_run (perf, "unaligned-clip", do_unaligned_clip); + cairo_perf_run (perf, "unaligned-clip", do_unaligned_clip, NULL); } diff --git a/perf/micro/world-map.c b/perf/micro/world-map.c index 2a45500..42b8da5 100644 --- a/perf/micro/world-map.c +++ b/perf/micro/world-map.c @@ -112,5 +112,5 @@ world_map (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "world-map", NULL)) return; - cairo_perf_run (perf, "world-map", do_world_map); + cairo_perf_run (perf, "world-map", do_world_map, NULL); } diff --git a/perf/micro/zrusin.c b/perf/micro/zrusin.c index 24aff14..87c8da3 100644 --- a/perf/micro/zrusin.c +++ b/perf/micro/zrusin.c @@ -90,6 +90,6 @@ zrusin (cairo_perf_t *perf, cairo_t *cr, int width, int height) if (! cairo_perf_can_run (perf, "zrusin", NULL)) return; - cairo_perf_run (perf, "zrusin-another-tessellate", zrusin_another_tessellate); - cairo_perf_run (perf, "zrusin-another-fill", zrusin_another_fill); + cairo_perf_run (perf, "zrusin-another-tessellate", zrusin_another_tessellate, NULL); + cairo_perf_run (perf, "zrusin-another-fill", zrusin_another_fill, NULL); } |