summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorBertram Felgenhauer <int-e@gmx.de>2008-02-16 09:22:01 +0100
committerBertram Felgenhauer <int-e@gmx.de>2008-02-19 22:19:44 +0100
commit24c319fbae9ea4a43bf4e1fdf94d069b4ad78904 (patch)
treec8c3275979becf160643351ed5c4469de513cd75 /perf
parent21049a9a5eb7ba0873771428bde0db8f8b1ece08 (diff)
[perf] add tests for magnified and minified image sources.
With this change, cairo's performance testsuite will catch performance regressions in pixman's fbFetchTransformed path.
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-perf-cover.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/perf/cairo-perf-cover.c b/perf/cairo-perf-cover.c
index bd12f0733..30942d271 100644
--- a/perf/cairo-perf-cover.c
+++ b/perf/cairo-perf-cover.c
@@ -97,6 +97,38 @@ set_source_image_surface_rgba (cairo_t *cr,
}
static void
+set_source_image_surface_rgba_mag (cairo_t *cr,
+ int width,
+ int height)
+{
+ cairo_surface_t *source;
+
+ source = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ width/2, height/2);
+ cairo_scale(cr, 2.1, 2.1);
+ init_and_set_source_surface (cr, source, width/2, height/2);
+ cairo_scale(cr, 1/2.1, 1/2.1);
+
+ cairo_surface_destroy (source);
+}
+
+static void
+set_source_image_surface_rgba_min (cairo_t *cr,
+ int width,
+ int height)
+{
+ cairo_surface_t *source;
+
+ source = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ width*2, height*2);
+ cairo_scale(cr, 1/1.9, 1/1.9);
+ init_and_set_source_surface (cr, source, width*2, height*2);
+ cairo_scale(cr, 1.9, 1.9);
+
+ cairo_surface_destroy (source);
+}
+
+static void
set_source_similar_surface_rgb (cairo_t *cr,
int width,
int height)
@@ -208,6 +240,8 @@ cairo_perf_cover_sources_and_operators (cairo_perf_t *perf,
{ set_source_solid_rgba, "solid_rgba" },
{ set_source_image_surface_rgb, "image_rgb" },
{ set_source_image_surface_rgba, "image_rgba" },
+ { set_source_image_surface_rgba_mag, "image_rgba_mag" },
+ { set_source_image_surface_rgba_min, "image_rgba_min" },
{ set_source_similar_surface_rgb, "similar_rgb" },
{ set_source_similar_surface_rgba, "similar_rgba" },
{ set_source_linear_rgb, "linear_rgb" },