From cfd8da474e31d9399ac26f6a3ee4a890785aed6f Mon Sep 17 00:00:00 2001 From: Bart Massey Date: Wed, 21 Aug 2013 16:09:09 -0700 Subject: added additional format tests for XY_PIXMAP bit planes --- image/test_formats.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/image/test_formats.c b/image/test_formats.c index 2a5b641..a167876 100644 --- a/image/test_formats.c +++ b/image/test_formats.c @@ -105,14 +105,17 @@ typedef struct { const char *name; xcb_image_format_t format; uint8_t depth; + uint32_t plane_mask; } format_t; static format_t formats[] = { - {"z-pixmap", XCB_IMAGE_FORMAT_Z_PIXMAP, 24}, - {"xy-bitmap", XCB_IMAGE_FORMAT_XY_BITMAP, 1}, - {"xy-pixmap-1", XCB_IMAGE_FORMAT_XY_PIXMAP, 1}, - {"xy-pixmap-24", XCB_IMAGE_FORMAT_XY_PIXMAP, 24}, - {0, 0, 0} + {"z-pixmap", XCB_IMAGE_FORMAT_Z_PIXMAP, 24, 0}, + {"xy-bitmap", XCB_IMAGE_FORMAT_XY_BITMAP, 1, 0}, + {"xy-pixmap-1", XCB_IMAGE_FORMAT_XY_PIXMAP, 1, 0}, + {"xy-pixmap-24", XCB_IMAGE_FORMAT_XY_PIXMAP, 24, 0}, + {"xy-pixmap-24-1", XCB_IMAGE_FORMAT_XY_PIXMAP, 24, 1}, + {"xy-pixmap-24-12", XCB_IMAGE_FORMAT_XY_PIXMAP, 24, 0xaaaaaaaa}, + {0, 0, 0, 0} }; static format_t * @@ -158,6 +161,8 @@ int main(int argc, char **argv) depth = format->depth; im = create_image(c, depth, format->format); + if (format->format == XCB_IMAGE_FORMAT_XY_PIXMAP && format->plane_mask != 0 && depth > 1) + im->plane_mask = format->plane_mask; d = create_window(c, root); if(format->format == XCB_IMAGE_FORMAT_XY_PIXMAP && depth == 1) { -- cgit v1.2.1