mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-21 21:30:10 +01:00
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:
parent
9c75065ece
commit
0ac81988c1
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue