summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-04-09 20:45:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-04-09 20:45:29 +0100
commitb6917eced7b2a96ec2432eac924a526e94371643 (patch)
tree97bf88cfd8d7bbda466e65cdbf61b12785f3b265 /src
parent6c07f467a347ea35b682fe4d21c5071adcf4e2aa (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')
-rw-r--r--src/sna/sna_blt.c4
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)