Skip to content

Commit

Permalink
image: The a8 in-place span compositing is only valid for SOURCE
Browse files Browse the repository at this point in the history
Fixes test/a8-clear.

Reported-by: Jeremy Moles <jeremy@emperorlinux.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Sep 29, 2010
1 parent 05faebd commit 66ace8c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cairo-image-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 66ace8c

Please sign in to comment.