diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-01 09:19:17 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-01 11:18:18 +0100 |
commit | 8174c56c3ad6f1b0e6cd432c888f3eaca91159b4 (patch) | |
tree | 54923df07e980bafa5e34e86398d7a7f8ecad4cb /src/sna | |
parent | c5e3b66c27e8960a39ba0fc9108e04a67e1c2d98 (diff) |
sna/glyphs: Allow glyphs-to-dst to discard CA masks for a8 glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_glyphs.c | 11 |
1 files changed, 6 insertions, 5 deletions
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; } |