diff --git a/src/sna/sna.h b/src/sna/sna.h index 110eae9d..1e6a803a 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -705,6 +705,7 @@ memcpy_blt(const void *src, void *dst, int bpp, #define SNA_CREATE_FB 0x10 #define SNA_CREATE_SCRATCH 0x11 +#define SNA_CREATE_GLYPH 0x12 inline static bool is_power_of_two(unsigned x) { diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 95836feb..209b199b 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -307,7 +307,12 @@ glyph_cache(ScreenPtr screen, if (glyph->info.width > GLYPH_MAX_SIZE || glyph->info.height > GLYPH_MAX_SIZE) { - ((PixmapPtr)glyph_picture->pDrawable)->usage_hint = 0; + PixmapPtr pixmap = (PixmapPtr)glyph_picture->pDrawable; + assert(glyph_picture->pDrawable->type == DRAWABLE_PIXMAP); + if (pixmap->drawable.depth >= 8) { + pixmap->usage_hint = SNA_CREATE_GLYPH; + sna_pixmap_force_to_gpu(pixmap, MOVE_READ); + } return FALSE; }