summaryrefslogtreecommitdiff
path: root/uxa/uxa-priv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-28 11:38:05 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-05-28 22:42:26 +0100
commit4e3c06f691a1073d811fd01cb965b3f2c63ca996 (patch)
treed7e5cd6e932b926f0132c57ba37f574cf03f7a47 /uxa/uxa-priv.h
parent7fdb7ceda0f95f147b1cc45ad4bfb21f0a495e4f (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> (cherry picked from commit 11581dda99cb2e4ae78fc73be4b02185b3be58ed) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa/uxa-priv.h')
-rw-r--r--uxa/uxa-priv.h20
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 */