diff options
author | Eric Anholt <eric@anholt.net> | 2009-06-02 00:37:19 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-06-02 00:56:39 -0700 |
commit | f59f44c140e5f60d336423e0585d2bb8a6c0ea01 (patch) | |
tree | b0e1369a4aedfb6ee288fd29264177e881021850 /perf/cairo-perf.c | |
parent | 2da78fd4666faa27d037ae3625ca83353a6e7629 (diff) | |
parent | 4232719af968ed05636fe34f2ffe2520dc02d737 (diff) |
Merge commit 'origin/master' into gl
Felt like pulling the latest stuff, since I branched back in February.
Conflicts:
build/configure.ac.features
src/cairo.h
util/cairo-script/csi-replay.c
Diffstat (limited to 'perf/cairo-perf.c')
-rw-r--r-- | perf/cairo-perf.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c index 6d93eb42..a0abee61 100644 --- a/perf/cairo-perf.c +++ b/perf/cairo-perf.c @@ -33,10 +33,6 @@ #include "cairo-boilerplate-getopt.h" -#if CAIRO_HAS_SDL_SURFACE -#include <SDL_main.h> -#endif - /* For basename */ #ifdef HAVE_LIBGEN_H #include <libgen.h> @@ -135,6 +131,9 @@ cairo_perf_has_similar (cairo_perf_t *perf) { cairo_surface_t *target = cairo_get_target (perf->cr); + if (getenv ("CAIRO_TEST_IGNORE_SIMILAR")) + return FALSE; + /* exclude the image backend */ if (cairo_surface_get_type (target) == CAIRO_SURFACE_TYPE_IMAGE) return FALSE; @@ -142,6 +141,22 @@ cairo_perf_has_similar (cairo_perf_t *perf) return TRUE; } +cairo_bool_t +cairo_perf_can_run (cairo_perf_t *perf, + const char *name) +{ + unsigned int i; + + if (perf->num_names == 0) + return TRUE; + + for (i = 0; i < perf->num_names; i++) + if (strstr (name, perf->names[i])) + return TRUE; + + return FALSE; +} + void cairo_perf_run (cairo_perf_t *perf, const char *name, @@ -153,14 +168,6 @@ cairo_perf_run (cairo_perf_t *perf, cairo_stats_t stats = {0.0, 0.0}; int low_std_dev_count; - if (perf->num_names) { - for (i = 0; i < perf->num_names; i++) - if (strstr (name, perf->names[i])) - goto NAME_FOUND; - return; - } - NAME_FOUND: - if (perf->list_only) { printf ("%s\n", name); return; @@ -445,11 +452,11 @@ main (int argc, char *argv[]) } const cairo_perf_case_t perf_cases[] = { - { paint, 256, 512}, - { paint_with_alpha, 256, 512}, - { fill, 64, 256}, - { stroke, 64, 256}, - { text, 64, 256}, + { paint, 64, 512}, + { paint_with_alpha, 64, 512}, + { fill, 64, 512}, + { stroke, 64, 512}, + { text, 64, 512}, { tessellate, 100, 100}, { subimage_copy, 16, 512}, { pattern_create_radial, 16, 16}, |