5 #include "pixman-private.h"
7 static const pixman_op_t op_list[] =
16 PIXMAN_OP_OVER_REVERSE,
20 PIXMAN_OP_OUT_REVERSE,
22 PIXMAN_OP_ATOP_REVERSE,
26 PIXMAN_OP_DISJOINT_CLEAR,
27 PIXMAN_OP_DISJOINT_SRC,
28 PIXMAN_OP_DISJOINT_DST,
29 PIXMAN_OP_DISJOINT_OVER,
30 PIXMAN_OP_DISJOINT_OVER_REVERSE,
31 PIXMAN_OP_DISJOINT_IN,
32 PIXMAN_OP_DISJOINT_IN_REVERSE,
33 PIXMAN_OP_DISJOINT_OUT,
34 PIXMAN_OP_DISJOINT_OUT_REVERSE,
35 PIXMAN_OP_DISJOINT_ATOP,
36 PIXMAN_OP_DISJOINT_ATOP_REVERSE,
37 PIXMAN_OP_DISJOINT_XOR,
38 PIXMAN_OP_CONJOINT_CLEAR,
39 PIXMAN_OP_CONJOINT_SRC,
40 PIXMAN_OP_CONJOINT_DST,
41 PIXMAN_OP_CONJOINT_OVER,
42 PIXMAN_OP_CONJOINT_OVER_REVERSE,
43 PIXMAN_OP_CONJOINT_IN,
44 PIXMAN_OP_CONJOINT_IN_REVERSE,
45 PIXMAN_OP_CONJOINT_OUT,
46 PIXMAN_OP_CONJOINT_OUT_REVERSE,
47 PIXMAN_OP_CONJOINT_ATOP,
48 PIXMAN_OP_CONJOINT_ATOP_REVERSE,
49 PIXMAN_OP_CONJOINT_XOR,
55 PIXMAN_OP_COLOR_DODGE,
62 PIXMAN_OP_HSL_SATURATION,
64 PIXMAN_OP_HSL_LUMINOSITY,
70 uint32_t u = prng_rand();
76 random_floats (argb_t *argb, int width)
80 for (i = 0; i < width; ++i)
93 static pixman_combine_float_func_t
94 lookup_combiner (pixman_implementation_t *imp, pixman_op_t op,
95 pixman_bool_t component_alpha)
97 pixman_combine_float_func_t f;
102 f = imp->combine_float_ca[op];
104 f = imp->combine_float[op];
116 pixman_implementation_t *impl;
117 argb_t *src_bytes = malloc (WIDTH * sizeof (argb_t));
118 argb_t *mask_bytes = malloc (WIDTH * sizeof (argb_t));
119 argb_t *dest_bytes = malloc (WIDTH * sizeof (argb_t));
122 enable_divbyzero_exceptions();
124 impl = _pixman_internal_only_get_implementation();
128 for (i = 0; i < ARRAY_LENGTH (op_list); ++i)
130 pixman_op_t op = op_list[i];
131 pixman_combine_float_func_t combiner;
134 for (ca = 0; ca < 2; ++ca)
136 combiner = lookup_combiner (impl, op, ca);
138 random_floats (src_bytes, WIDTH);
139 random_floats (mask_bytes, WIDTH);
140 random_floats (dest_bytes, WIDTH);