mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-16 19:32:26 +00:00
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).
This commit is contained in:
parent
4c6abe1c7c
commit
516b96387b
3 changed files with 71 additions and 25 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue