Make it possible to clear glyph caches from the font engine.
Change-Id: Iea62bc1727269ed3893d8b4dbcefa583f1b85d7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
ab17a3c3c4
commit
22c2d13406
@ -891,6 +891,16 @@ QByteArray QFontEngine::getSfntTable(uint tag) const
|
||||
return table;
|
||||
}
|
||||
|
||||
void QFontEngine::clearGlyphCache(const void *key)
|
||||
{
|
||||
for (QLinkedList<GlyphCacheEntry>::iterator it = m_glyphCaches.begin(), end = m_glyphCaches.end(); it != end; ) {
|
||||
if (it->context == key)
|
||||
it = m_glyphCaches.erase(it);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
void QFontEngine::setGlyphCache(const void *key, QFontEngineGlyphCache *data)
|
||||
{
|
||||
Q_ASSERT(data);
|
||||
|
@ -256,6 +256,7 @@ public:
|
||||
|
||||
virtual int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints);
|
||||
|
||||
void clearGlyphCache(const void *key);
|
||||
void setGlyphCache(const void *key, QFontEngineGlyphCache *data);
|
||||
QFontEngineGlyphCache *glyphCache(const void *key, QFontEngineGlyphCache::Type type, const QTransform &transform) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user