From 66ace8cd33c0ebe88972f0c4d5c0effeacb1cea3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 29 Sep 2010 13:46:02 +0100 Subject: [PATCH] image: The a8 in-place span compositing is only valid for SOURCE Fixes test/a8-clear. Reported-by: Jeremy Moles Signed-off-by: Chris Wilson --- src/cairo-image-surface.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 2a1c8186d..491859f74 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -3447,10 +3447,15 @@ _composite_spans (void *closure, /* TODO: support rendering to A1 surfaces (or: go add span * compositing to pixman.) */ - if (pattern == NULL && dst_format == PIXMAN_a8) { + if (pattern == NULL && + dst_format == PIXMAN_a8 && + op == CAIRO_OPERATOR_SOURCE) + { mask = dst; dst = NULL; - } else { + } + else + { int stride = CAIRO_STRIDE_FOR_WIDTH_BPP (extents->width, 8); uint8_t *data = mask_buf;