[cairo-commit] 2 commits - perf/cairo-perf.h perf/cairo-perf-micro.c perf/micro test/random-clip.ref.png
Chris Wilson
ickle at kemper.freedesktop.org
Thu Sep 15 03:10:04 PDT 2011
perf/cairo-perf-micro.c | 1 +
perf/cairo-perf.h | 1 +
perf/micro/pixel.c | 22 ++++++++++++++++++++++
test/random-clip.ref.png |binary
4 files changed, 24 insertions(+)
New commits:
commit f1ea9dd8368b77907d8cf2edf486e8c983e65731
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Sep 15 11:08:04 2011 +0100
test: Use the trapezoid reference image for random-clip
Oh dear it looks like we have a bug in image's polygon clipping.
diff --git a/test/random-clip.ref.png b/test/random-clip.ref.png
index c74021c..573d638 100644
Binary files a/test/random-clip.ref.png and b/test/random-clip.ref.png differ
commit ffbf6158be101553cd88eb3ad5dbcebac00a3774
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Sep 15 10:13:40 2011 +0100
perf: Add an a1-pixel variant
Just to measure the overhead and differences when switching between
antialiasing paths.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/perf/cairo-perf-micro.c b/perf/cairo-perf-micro.c
index bbcf5c9..61ed55f 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 b5e1d96..feab74b 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 dd3ba52..b600b51 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);
+}
More information about the cairo-commit
mailing list