aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/test/utils.h')
-rw-r--r--pixman/test/utils.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/pixman/test/utils.h b/pixman/test/utils.h
index 3bff78e76..3c0647bc6 100644
--- a/pixman/test/utils.h
+++ b/pixman/test/utils.h
@@ -151,3 +151,38 @@ aligned_malloc (size_t align, size_t size);
void
initialize_palette (pixman_indexed_t *palette, uint32_t depth, int is_rgb);
+
+typedef struct
+{
+ double r, g, b, a;
+} color_t;
+
+void
+round_color (pixman_format_code_t format, color_t *color);
+
+typedef struct
+{
+ pixman_format_code_t format;
+ uint32_t am, rm, gm, bm;
+ uint32_t as, rs, gs, bs;
+ uint32_t aw, rw, gw, bw;
+} pixel_checker_t;
+
+void
+pixel_checker_init (pixel_checker_t *checker, pixman_format_code_t format);
+
+void
+pixel_checker_split_pixel (const pixel_checker_t *checker, uint32_t pixel,
+ int *a, int *r, int *g, int *b);
+
+void
+pixel_checker_get_max (const pixel_checker_t *checker, color_t *color,
+ int *a, int *r, int *g, int *b);
+
+void
+pixel_checker_get_min (const pixel_checker_t *checker, color_t *color,
+ int *a, int *r, int *g, int *b);
+
+pixman_bool_t
+pixel_checker_check (const pixel_checker_t *checker,
+ uint32_t pixel, color_t *color);