Add support for image fallbacks for X servers with 555 visuals

This fixes bugzilla #9993:

	Cairo fails with 555 X server visual
	https://bugs.freedesktop.org/show_bug.cgi?id=9993
This commit is contained in:
Carl Worth 2007-08-17 10:41:03 -07:00
parent f00fb10f87
commit 333b96f0e0
2 changed files with 15 additions and 1 deletions

View file

@ -37,7 +37,7 @@ cairo 1.4.x (not scheduled, may become part of 1.6)
7735 cairo doesn't support 8-bit truecolor visuals
4945 Cairo doesn't support 8-bit pseudocolor visuals
9719 Cairo doesn't support 655 xlib format
9993 Cairo fails with 555 X server visual
9993 Cairo fails with 555 X server visual
✓ 10461 Cairo doesn't support 565 xlib visual
✓ Discard trapezoids that lie outside the clip region (cworth)

View file

@ -217,6 +217,13 @@ _pixman_format_from_masks (cairo_format_masks_t *masks)
{
return PIXMAN_r5g6b5;
}
if (masks->alpha_mask == 0x0000 &&
masks->red_mask == 0x7c00 &&
masks->green_mask == 0x03e0 &&
masks->blue_mask == 0x001f)
{
return PIXMAN_x1r5g5b5;
}
break;
case 8:
if (masks->alpha_mask == 0xff)
@ -278,6 +285,13 @@ _pixman_format_to_masks (pixman_format_code_t pixman_format,
*blue = 0x001f;
break;
case PIXMAN_x1r5g5b5:
*bpp = 16;
*red = 0x7c00;
*green = 0x03e0;
*blue = 0x001f;
break;
case PIXMAN_a8:
*bpp = 8;
break;