From 16aaa51b5d326f44974489f5b29716c7ff5ab48e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 12 Jul 2012 15:26:54 +0100 Subject: sna: Rearrange the tests for dropping the glyph mask Signed-off-by: Chris Wilson --- src/sna/sna_glyphs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') 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, -- cgit v1.2.3