mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-29 07:40:27 +01:00
xcb: Correctly handle ARGB visuals
We want surface->depth to end up as "32", so we have to invent an alpha mask. This mask is not used anyway (only its popcount), but still this should get a less ugly fix. This was found because "assert (reply->depth == surface->depth);" in _get_image() failed. Original-patch-by: Ross Alexander <Ross.Alexander@EU.NEC.COM> Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
da62cc21da
commit
e6ce65fb82
1 changed files with 3 additions and 0 deletions
|
|
@ -1177,6 +1177,9 @@ cairo_xcb_surface_create (xcb_connection_t *xcb_connection,
|
|||
image_masks.red_mask = visual->red_mask;
|
||||
image_masks.green_mask = visual->green_mask;
|
||||
image_masks.blue_mask = visual->blue_mask;
|
||||
if (depth == 32) /* XXX visuals have no alpha! */
|
||||
image_masks.alpha_mask =
|
||||
0xffffffff & ~(visual->red_mask | visual->green_mask | visual->blue_mask);
|
||||
if (depth > 16)
|
||||
image_masks.bpp = 32;
|
||||
else if (depth > 8)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue