summaryrefslogtreecommitdiff
path: root/common/glyph_cache.h
blob: f783a3a89a7682c4f2149b3c4d3e313927ab78a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef GLYPH_CACHE_H
#define GLYPH_CACHE_H

typedef void (*glyph_upload_t)(ScreenPtr, PicturePtr, GlyphPtr,
			       PicturePtr, unsigned, unsigned);

Bool glyph_cache_init(ScreenPtr pScreen, glyph_upload_t,
	const unsigned *formats, size_t num_formats, unsigned usage_hint);

PicturePtr glyph_cache_only(ScreenPtr pScreen, GlyphPtr pGlyph, xPoint *pos);
PicturePtr glyph_cache(ScreenPtr pScreen, GlyphPtr pGlyph, xPoint *pos);
Bool glyph_cache_preload(ScreenPtr pScreen, int nlist, GlyphListPtr list,
	GlyphPtr *glyphs);
void glyph_cache_remove(ScreenPtr pScreen, GlyphPtr pGlyph);

#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)

#endif