From 34c1e86406451a3604de4982339058088434ab40 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 17 Jan 2012 08:43:22 +0100 Subject: git update mesa pixman xserver 17 jan 2012 --- pixman/test/utils.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'pixman/test/utils.h') 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); -- cgit v1.2.3