diff --git a/perf/micro/paint-with-alpha.c b/perf/micro/paint-with-alpha.c index 048cdb010..051d653d3 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, NULL); + do_paint_with_alpha, + count_paint_with_alpha); } diff --git a/perf/micro/paint.c b/perf/micro/paint.c index ce8cfd370..1ba108fb7 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, NULL); + cairo_perf_cover_sources_and_operators (perf, "paint", do_paint, count_paint); }