test/pixman-downscale: Open-code fmin()

fmin() requires a bump to either _XOPEN_SOURCE_ >= 600 (POSIX 2004) or
c99 - which is a needless dependency for a single simple routine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-09-17 08:32:29 +01:00
parent 9c75065ece
commit 0ac81988c1

View file

@ -51,7 +51,7 @@ draw (cairo_t *cr, int width, int height, cairo_filter_t filter)
image = cairo_test_create_surface_from_png (ctx, png_filename);
x_scale = width * 1.0 / cairo_image_surface_get_width (image);
y_scale = height * 1.0 / cairo_image_surface_get_height (image);
scale = fmin(x_scale, y_scale);
scale = x_scale < y_scale ? x_scale : y_scale;
cairo_save (cr);
cairo_scale (cr, scale, scale);