From 56aaf932d3bd8b4c8155ce21504f5c6370f3ffab Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Fri, 12 Oct 2007 22:35:55 +0200 Subject: [PATCH] Move the variable declarations to the top (ISO90 says so) and and the stupidly forgotten call to cairo_set_source(). --- perf/composite_checker.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/perf/composite_checker.c b/perf/composite_checker.c index 9089158..28ee073 100644 --- a/perf/composite_checker.c +++ b/perf/composite_checker.c @@ -30,6 +30,11 @@ do_composite_checker (cairo_t *cr, int width, int height) { + /* Compute zoom so that the src_pattern covers the whole output + image. */ + double xscale = (double) width / (double) SRC_SIZE; + double yscale = (double) height / (double) SRC_SIZE; + cairo_perf_timer_start (); cairo_identity_matrix (cr); @@ -38,13 +43,9 @@ do_composite_checker (cairo_t *cr, cairo_set_source (cr, checkerboard); cairo_paint (cr); - /* Compute zoom so that the src_pattern covers the whole output - image. */ - double xscale = (double) width / (double) SRC_SIZE; - double yscale = (double) height / (double) SRC_SIZE; - cairo_scale (cr, xscale, yscale); - /* Draw the scaled image on top. */ + cairo_scale (cr, xscale, yscale); + cairo_set_source (cr, src_pattern); cairo_paint (cr); cairo_perf_timer_stop (); -- 1.5.3.4