diff options
author | Bart Massey <bart@cs.pdx.edu> | 2013-08-21 16:09:09 -0700 |
---|---|---|
committer | Bart Massey <bart@cs.pdx.edu> | 2013-08-23 16:39:38 -0700 |
commit | cfd8da474e31d9399ac26f6a3ee4a890785aed6f (patch) | |
tree | b7f7fd496c5281448293bc9144e42cc03fd289ca | |
parent | 3577db110e03985d4486cae6caf3ceb5696c45e9 (diff) |
added additional format tests for XY_PIXMAP bit planes
-rw-r--r-- | image/test_formats.c | 15 |
1 files 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) { |