diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-28 11:38:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-28 12:44:34 +0100 |
commit | 11581dda99cb2e4ae78fc73be4b02185b3be58ed (patch) | |
tree | 50f46de91709f7c8debef43656eab690146bd5a2 /uxa/uxa-priv.h | |
parent | 73111cf2a212ee5cc2e03af1c600867df0c55b39 (diff) |
uxa: Use a glyph private rather than a hash table.
Store the cache position directly on the glyph using a devPrivate rather
than an through auxiliary hash table.
x11perf on PineView:
650/638 kglyphs/s -> 701/686 kglyphs/s [aa/rgb]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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 bace6798..a183db9b 100644 --- a/uxa/uxa-priv.h +++ b/uxa/uxa-priv.h @@ -103,10 +103,6 @@ char uxa_drawable_location(DrawablePtr pDrawable); #endif typedef struct { - unsigned char sha1[20]; -} uxa_cached_glyph_t; - -typedef struct { /* The identity of the cache, statically configured at initialization */ unsigned int format; int glyphWidth; @@ -115,16 +111,7 @@ typedef struct { /* Size of cache; eventually this should be dynamically determined */ int size; - /* Hash table mapping from glyph sha1 to position in the glyph; we use - * open addressing with a hash table size determined based on size and large - * enough so that we always have a good amount of free space, so we can - * use linear probing. (Linear probing is preferrable to double hashing - * here because it allows us to easily remove entries.) - */ - int *hashEntries; - int hashSize; - - uxa_cached_glyph_t *glyphs; + GlyphPtr *glyphs; int glyphCount; /* Current number of glyphs */ PicturePtr picture; /* Where the glyphs of the cache are stored */ @@ -161,6 +148,7 @@ typedef struct { GlyphsProcPtr SavedGlyphs; TrapezoidsProcPtr SavedTrapezoids; AddTrapsProcPtr SavedAddTraps; + UnrealizeGlyphProcPtr SavedUnrealizeGlyph; #endif EnableDisableFBAccessProcPtr SavedEnableDisableFBAccess; @@ -472,4 +460,8 @@ uxa_glyphs(CARD8 op, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); +void +uxa_glyph_unrealize(ScreenPtr pScreen, + GlyphPtr pGlyph); + #endif /* UXAPRIV_H */ |