From 8174c56c3ad6f1b0e6cd432c888f3eaca91159b4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 1 Aug 2013 09:19:17 +0100 Subject: sna/glyphs: Allow glyphs-to-dst to discard CA masks for a8 glyphs Signed-off-by: Chris Wilson --- src/sna/sna_glyphs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/sna/sna_glyphs.c') diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 43086a0d..7e6aab3a 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -1233,11 +1233,8 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs) while (n--) { GlyphPtr glyph = *glyphs++; - if (!glyph_valid(glyph)) { - x += glyph->info.xOff; - y += glyph->info.yOff; - continue; - } + if (!glyph_valid(glyph)) + goto skip_glyph; x1 = x - glyph->info.x; y1 = y - glyph->info.y; @@ -1273,6 +1270,7 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs) if (y2 > extents.y2) extents.y2 = y2; } +skip_glyph: x += glyph->info.xOff; y += glyph->info.yOff; } @@ -1330,6 +1328,9 @@ static bool can_discard_mask(uint8_t op, PicturePtr src, PictFormatPtr mask, list++; } } else { + if (PICT_FORMAT_A(mask->format) >= PICT_FORMAT_A(g->format)) + return true; + if (g->depth != 1) return false; } -- cgit v1.2.3