mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 16:58:01 +02:00
xlib: Only reduce a readback of an uninitialised source for pixmaps
For a foreign drawable, we have to assume to that is dirty upon creation or otherwise we fail to read back the correct pixel data when copying to an image. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
24445f9468
commit
c6c02f5194
1 changed files with 3 additions and 1 deletions
|
|
@ -693,7 +693,9 @@ _get_image_surface (cairo_xlib_surface_t *surface,
|
|||
assert (extents->x + extents->width <= surface->width);
|
||||
assert (extents->y + extents->height <= surface->height);
|
||||
|
||||
if (surface->base.serial == 0) {
|
||||
if (surface->base.is_clear ||
|
||||
(surface->base.serial == 0 && surface->owns_pixmap))
|
||||
{
|
||||
xlib_masks.bpp = bits_per_pixel (surface);
|
||||
xlib_masks.alpha_mask = surface->a_mask;
|
||||
xlib_masks.red_mask = surface->r_mask;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue