summaryrefslogtreecommitdiff
path: root/src/sna/sna_glyphs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-12 15:26:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-12 15:34:39 +0100
commit16aaa51b5d326f44974489f5b29716c7ff5ab48e (patch)
treebb4d7fb2d2011b7ce1cc1c7f841d3e6550df6336 /src/sna/sna_glyphs.c
parent600746f923b046187a66b60b5e5d2b187475730e (diff)
sna: Rearrange the tests for dropping the glyph mask
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_glyphs.c')
-rw-r--r--src/sna/sna_glyphs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index 88e1c9eb..aba5fef4 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1417,9 +1417,7 @@ sna_glyphs(CARD8 op,
goto fallback;
}
- if (!mask ||
- (((nlist == 1 && list->len == 1) || op == PictOpAdd) &&
- dst->format == (mask->depth << 24 | mask->format))) {
+ if (mask == NULL) {
if (glyphs_to_dst(sna, op,
src, dst,
src_x, src_y,
@@ -1428,9 +1426,8 @@ sna_glyphs(CARD8 op,
}
/* Try to discard the mask for non-overlapping glyphs */
- if (mask &&
- op_is_bounded(op) &&
- dst->pCompositeClip->data == NULL &&
+ if (mask && dst->pCompositeClip->data == NULL &&
+ (op_is_bounded(op) || (nlist == 1 && list->len == 1)) &&
mask == glyphs_format(nlist, list, glyphs)) {
if (glyphs_to_dst(sna, op,
src, dst,