sna: Immediately upload oversized glyphs

Glyphs, even large ones, we suspect will be reused and so the deferred
upload is counterproductive. Upload them immediately and mark them as
special creatures for later debugging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-01-05 10:23:25 +00:00
parent 797b27365d
commit a09ebe0b6c
2 changed files with 7 additions and 1 deletions

View File

@ -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)
{

View File

@ -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;
}