summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-xlib-render-compositor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 68e7ce5..e5ac968 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -311,12 +311,11 @@ draw_image_boxes (void *_dst,
_cairo_box_round_to_rectangle (&extents, &r);
shm = (cairo_image_surface_t *)
- _cairo_xlib_surface_create_shm (dst, image->pixman_format,
+ _cairo_xlib_surface_create_shm (dst, _pixman_format_for_xlib_surface (dst),
r.width, r.height);
if (shm) {
int tx = -r.x, ty = -r.y;
- assert (shm->pixman_format == image->pixman_format);
for (chunk = &boxes->chunks; chunk; chunk = chunk->next) {
for (i = 0; i < chunk->count; i++) {
cairo_box_t *b = &chunk->base[i];
@@ -326,7 +325,8 @@ draw_image_boxes (void *_dst,
r.width = _cairo_fixed_integer_part (b->p2.x) - r.x;
r.height = _cairo_fixed_integer_part (b->p2.y) - r.y;
- if (! pixman_blt ((uint32_t *)image->data, (uint32_t *)shm->data,
+ if (shm->pixman_format != image->pixman_format ||
+ ! pixman_blt ((uint32_t *)image->data, (uint32_t *)shm->data,
image->stride / sizeof (uint32_t),
shm->stride / sizeof (uint32_t),
PIXMAN_FORMAT_BPP (image->pixman_format),