diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-04-09 20:45:29 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-04-09 20:45:29 +0100 |
commit | b6917eced7b2a96ec2432eac924a526e94371643 (patch) | |
tree | 97bf88cfd8d7bbda466e65cdbf61b12785f3b265 /src/sna/sna_blt.c | |
parent | 6c07f467a347ea35b682fe4d21c5071adcf4e2aa (diff) |
sna: Restict reduction of ADD white when we have compatibile formats
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_blt.c')
-rw-r--r-- | src/sna/sna_blt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index d7441ada..8b1bee12 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -2647,7 +2647,9 @@ nop: } if (op == PictOpOver && is_opaque_solid(src)) op = PictOpSrc; - if (op == PictOpAdd && is_white(src)) + if (op == PictOpAdd && + PICT_FORMAT_RGB(src->format) == PICT_FORMAT_RGB(dst->format) && + is_white(src)) op = PictOpSrc; if (was_clear && (op == PictOpAdd || op == PictOpOver)) { if (sna_pixmap(tmp->dst.pixmap)->clear_color == 0) |