diff options
-rw-r--r-- | perf/cairo-perf-micro.c | 1 | ||||
-rw-r--r-- | perf/cairo-perf.h | 1 | ||||
-rw-r--r-- | perf/micro/pixel.c | 22 |
3 files changed, 24 insertions, 0 deletions
diff --git a/perf/cairo-perf-micro.c b/perf/cairo-perf-micro.c index bbcf5c9c4..61ed55fc3 100644 --- a/perf/cairo-perf-micro.c +++ b/perf/cairo-perf-micro.c @@ -545,6 +545,7 @@ main (int argc, #define FUNC(f) f, f##_enabled const cairo_perf_case_t perf_cases[] = { { FUNC(pixel), 1, 1 }, + { FUNC(a1_pixel), 1, 1 }, { FUNC(paint), 64, 512}, { FUNC(paint_with_alpha), 64, 512}, { FUNC(fill), 64, 512}, diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h index b5e1d9696..feab74be3 100644 --- a/perf/cairo-perf.h +++ b/perf/cairo-perf.h @@ -225,6 +225,7 @@ CAIRO_PERF_DECL (a1_curve); CAIRO_PERF_DECL (line); CAIRO_PERF_DECL (a1_line); CAIRO_PERF_DECL (pixel); +CAIRO_PERF_DECL (a1_pixel); CAIRO_PERF_DECL (sierpinski); CAIRO_PERF_DECL (fill_clip); CAIRO_PERF_DECL (tiger); diff --git a/perf/micro/pixel.c b/perf/micro/pixel.c index dd3ba526e..b600b5170 100644 --- a/perf/micro/pixel.c +++ b/perf/micro/pixel.c @@ -213,3 +213,25 @@ pixel (cairo_perf_t *perf, cairo_t *cr, int width, int height) cairo_perf_run (perf, "pixel-circle", pixel_circle, NULL); cairo_perf_run (perf, "pixel-stroke", pixel_stroke, NULL); } + +cairo_bool_t +a1_pixel_enabled (cairo_perf_t *perf) +{ + return cairo_perf_can_run (perf, "a1-pixel", NULL); +} + +void +a1_pixel (cairo_perf_t *perf, cairo_t *cr, int width, int height) +{ + cairo_set_source_rgb (cr, 1., 1., 1.); + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + + cairo_perf_run (perf, "a1-pixel-direct", pixel_direct, NULL); + cairo_perf_run (perf, "a1-pixel-paint", pixel_paint, NULL); + cairo_perf_run (perf, "a1-pixel-mask", pixel_mask, NULL); + cairo_perf_run (perf, "a1-pixel-rectangle", pixel_rectangle, NULL); + cairo_perf_run (perf, "a1-pixel-subrectangle", pixel_subrectangle, NULL); + cairo_perf_run (perf, "a1-pixel-triangle", pixel_triangle, NULL); + cairo_perf_run (perf, "a1-pixel-circle", pixel_circle, NULL); + cairo_perf_run (perf, "a1-pixel-stroke", pixel_stroke, NULL); +} |