diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-29 17:35:00 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-05-31 19:12:19 +0100 |
commit | f6cd08d57843d5e604d9cc3f687b01a9e0b2d1cf (patch) | |
tree | 5608f9b5e5d9954cf312a1279dfedd239cde2e7e /uxa/uxa-priv.h | |
parent | 94b208d9e7d85e58d0a4c7803ba2c2a72ed73dd3 (diff) |
uxa: Mega-Glyphs!
Rewrite glyph rendering to avoid the intermediate buffer, accumulating
the glyph rectangles directly in the backend composite routines. And
modify the glyph cache routines to fully utilise the allocated size of
the tiled buffer on older hardware. To do this we alias all glyph sizes
into the same texture using a technique suggested by Keith Packard.
PineView:
885/856-> 1150/1110 kglyph/s (aa/rgb)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 5fff430046db2030f89e49beb66c6476dc3fcd4c)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa/uxa-priv.h')
-rw-r--r-- | uxa/uxa-priv.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h index 47e0b6a9..36625de8 100644 --- a/uxa/uxa-priv.h +++ b/uxa/uxa-priv.h @@ -103,21 +103,13 @@ char uxa_drawable_location(DrawablePtr pDrawable); #endif typedef struct { - /* The identity of the cache, statically configured at initialization */ - unsigned int format; - int glyphWidth; - int glyphHeight; - - GlyphPtr *glyphs; - int glyphCount; /* Current number of glyphs */ - PicturePtr picture; /* Where the glyphs of the cache are stored */ - int yOffset; /* y location within the picture where the cache starts */ - int columns; /* Number of columns the glyphs are layed out in */ - int evictionPosition; /* Next random position to evict a glyph */ + GlyphPtr *glyphs; + uint16_t count; + uint16_t evict; } uxa_glyph_cache_t; -#define UXA_NUM_GLYPH_CACHES 4 +#define UXA_NUM_GLYPH_CACHE_FORMATS 2 typedef struct { uint32_t color; @@ -154,7 +146,7 @@ typedef struct { unsigned disableFbCount; unsigned offScreenCounter; - uxa_glyph_cache_t glyphCaches[UXA_NUM_GLYPH_CACHES]; + uxa_glyph_cache_t glyphCaches[UXA_NUM_GLYPH_CACHE_FORMATS]; PicturePtr solid_clear, solid_black, solid_white; uxa_solid_cache_t solid_cache[UXA_NUM_SOLID_CACHE]; @@ -445,7 +437,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel, CARD32 format); /* uxa_glyph.c */ -void uxa_glyphs_init(ScreenPtr pScreen); +Bool uxa_glyphs_init(ScreenPtr pScreen); void uxa_glyphs_fini(ScreenPtr pScreen); |