summaryrefslogtreecommitdiff
path: root/perf/cairo-perf.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-03-30 04:10:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-03-30 15:28:37 +0100
commit72481acf0d1e8648c5d03ce51f84c639132475a9 (patch)
tree1da9fc191e1b4a9b3e4913bef4a47bb4bb4b6917 /perf/cairo-perf.h
parent2a98d0586c19fbb2b555f471895d73f253c4943b (diff)
downloadcairo-72481acf0d1e8648c5d03ce51f84c639132475a9.tar.gz
perf: Compute ops per second
Provide a hook for the test to be able to compute the number of ops per second. For instance, the glyphs test uses it to report the number of kiloglyph per second Cairo is able to render.
Diffstat (limited to 'perf/cairo-perf.h')
-rw-r--r--perf/cairo-perf.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h
index 6d1741aa3..c4eeb1674 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 */