summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_glyphs.c11
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;
}