int w, h;
pixman_fixed_t scale_x = 65536, scale_y = 65536;
pixman_fixed_t translate_x = 0, translate_y = 0;
- int op;
- int repeat = 0;
- int src_fmt, dst_fmt;
+ pixman_op_t op;
+ pixman_repeat_t repeat = PIXMAN_REPEAT_NONE;
+ pixman_format_code_t src_fmt, dst_fmt;
uint32_t * srcbuf;
uint32_t * dstbuf;
uint32_t crc32;
uint32_t *buf;
pixman_image_t *img;
- while (allowed_formats[n] != -1)
+ while (allowed_formats[n] != PIXMAN_null)
n++;
fmt = allowed_formats[lcg_rand_n (n)];
uint32_t *data = pixman_image_get_data (img);
int height = pixman_image_get_height (img);
- if (fmt != -1)
+ if (fmt != PIXMAN_null)
{
/* mask unused 'x' part */
if (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt) &&
PIXMAN_a1r1g1b1,
PIXMAN_a1b1g1r1,
PIXMAN_a1,
- -1
+ PIXMAN_null
};
static pixman_format_code_t mask_fmt_list[] = {
PIXMAN_a8,
PIXMAN_a4,
PIXMAN_a1,
- -1
+ PIXMAN_null
};
int dst_x, dst_y;
int mask_x, mask_y;
int w, h;
- int op;
+ pixman_op_t op;
pixman_format_code_t src_fmt, dst_fmt, mask_fmt;
uint32_t *dstbuf, *srcbuf, *maskbuf;
uint32_t crc32;
dst_y = lcg_rand_n (dst_height);
mask_img = NULL;
- mask_fmt = -1;
+ mask_fmt = PIXMAN_null;
mask_x = 0;
mask_y = 0;
maskbuf = NULL;
printf ("---\n");
}
- free_random_image (0, src_img, -1);
+ free_random_image (0, src_img, PIXMAN_null);
crc32 = free_random_image (0, dst_img, dst_fmt);
if (mask_img)
if (srcbuf == maskbuf)
pixman_image_unref(mask_img);
else
- free_random_image (0, mask_img, -1);
+ free_random_image (0, mask_img, PIXMAN_null);
}
FLOAT_REGS_CORRUPTION_DETECTOR_FINISH ();
return result;
}
-typedef struct info_t info_t;
-struct info_t
+typedef struct filter_info_t filter_info_t;
+struct filter_info_t
{
- int value;
+ pixman_filter_t value;
char name[28];
};
-static const info_t filters[] =
+static const filter_info_t filters[] =
{
{ PIXMAN_FILTER_NEAREST, "NEAREST" },
{ PIXMAN_FILTER_BILINEAR, "BILINEAR" },
{ PIXMAN_FILTER_CONVOLUTION, "CONVOLUTION" },
};
-static const info_t repeats[] =
+typedef struct repeat_info_t repeat_info_t;
+struct repeat_info_t
+{
+ pixman_repeat_t value;
+ char name[28];
+};
+
+
+static const repeat_info_t repeats[] =
{
{ PIXMAN_REPEAT_PAD, "PAD" },
{ PIXMAN_REPEAT_REFLECT, "REFLECT" },
int w, h;
pixman_fixed_t scale_x = 65536, scale_y = 65536;
pixman_fixed_t translate_x = 0, translate_y = 0;
- int op;
- int repeat = 0;
- int src_fmt, dst_fmt;
+ pixman_op_t op;
+ pixman_repeat_t repeat = PIXMAN_REPEAT_NONE;
+ pixman_format_code_t src_fmt, dst_fmt;
uint32_t * srcbuf;
uint32_t * dstbuf;
uint32_t crc32;