5 #include "pixman-inlines.h"
7 /* A trivial reference implementation for
8 * 'bilinear_pad_repeat_get_scanline_bounds'
11 bilinear_pad_repeat_get_scanline_bounds_ref (int32_t source_image_width,
13 pixman_fixed_t unit_x,
31 if (vx + pixman_fixed_1 < 0)
36 else if (vx + pixman_fixed_1 >= pixman_int_to_fixed (source_image_width))
38 if (vx >= pixman_int_to_fixed (source_image_width))
55 for (i = 0; i < 10000; i++)
57 int32_t left_pad1, left_tz1, width1, right_tz1, right_pad1;
58 int32_t left_pad2, left_tz2, width2, right_tz2, right_pad2;
59 pixman_fixed_t vx = lcg_rand_N(10000 << 16) - (3000 << 16);
60 int32_t width = lcg_rand_N(10000);
61 int32_t source_image_width = lcg_rand_N(10000) + 1;
62 pixman_fixed_t unit_x = lcg_rand_N(10 << 16) + 1;
63 width1 = width2 = width;
65 bilinear_pad_repeat_get_scanline_bounds_ref (source_image_width,
74 bilinear_pad_repeat_get_scanline_bounds (source_image_width,
83 assert (left_pad1 == left_pad2);
84 assert (left_tz1 == left_tz2);
85 assert (width1 == width2);
86 assert (right_tz1 == right_tz2);
87 assert (right_pad1 == right_pad2);