sna/glyphs: Convert all sub-8bpp masks to a8

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-09-24 19:26:46 +01:00
parent c79e90da71
commit af4d3853ae
1 changed files with 3 additions and 6 deletions

View File

@ -721,13 +721,10 @@ glyphs_via_mask(struct sna *sna,
src_x += box.x1 - list->xOff;
src_y += box.y1 - list->yOff;
if (format->depth == 1) {
PictFormatPtr a8Format =
PictureMatchFormat(screen, 8, PICT_a8);
if (!a8Format)
if (format->depth < 8) {
format = PictureMatchFormat(screen, 8, PICT_a8);
if (!format)
return FALSE;
format = a8Format;
}
pixmap = screen->CreatePixmap(screen,