summaryrefslogtreecommitdiff
path: root/render/glyphstr.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-07-30 17:31:47 -0700
committerCarl Worth <cworth@cworth.org>2007-08-02 22:49:56 -0700
commit516b96387b0e57b524a37a96da22dbeeeb041712 (patch)
tree5fa54ddec7fcdf937b50234223773afc91b234a6 /render/glyphstr.h
parent4c6abe1c7c8abcf203572bbf86b21d97ea4e756f (diff)
ProcRenderAddGlyphs: Avoid allocating a glyph just to find it cached
This is a cleanup without any real savings (yet). Previously, the implementation would allocate a new glyph, then (often) find it in the cache, and immediately discard the allocated object. This re-organization first uses a new FindGlyphByHash function and only allocates the glyph if nothing is found. This isn't a real savings yet, since FindGlyphByHash currently still does a temporary glyph allocation, but this is expected to be replaced immediately as we switch to an alternate hashing mechanism (SHA1).
Diffstat (limited to 'render/glyphstr.h')
-rw-r--r--render/glyphstr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/render/glyphstr.h b/render/glyphstr.h
index b941dabaf..37462f744 100644
--- a/render/glyphstr.h
+++ b/render/glyphstr.h
@@ -129,6 +129,12 @@ FindGlyphHashSet (CARD32 filled);
GlyphRefPtr
FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare);
+GlyphPtr
+FindGlyphByHash (CARD32 hash,
+ xGlyphInfo *gi,
+ CARD8 *bits,
+ int format);
+
CARD32
HashGlyphInfoAndBits (xGlyphInfo *gi, CARD8 *data, unsigned int size);