#endif
m_requestedGlyphsThatHaveNotBeenReturned.unite(glyphs);
+ m_requestedGlyphs.unite(glyphs);
QVector<quint32> glyphsVector;
glyphsVector.reserve(glyphs.size());
m_cacheId.constData(), glyphs.size());
#endif
+ m_requestedGlyphs.subtract(glyphs);
+
QVector<quint32> glyphsVector;
glyphsVector.reserve(glyphs.size());
#endif
for (int i=0; i<itemIds.size(); ++i) {
- PendingGlyph &pendingGlyph = m_pendingReadyGlyphs[itemIds.at(i)];
- void *oldBuffer = pendingGlyph.buffer;
- Q_ASSERT(bufferSize.height() >= pendingGlyph.bufferSize.height());
+ if (m_requestedGlyphs.contains(itemIds.at(i))) {
+ PendingGlyph &pendingGlyph = m_pendingReadyGlyphs[itemIds.at(i)];
+ void *oldBuffer = pendingGlyph.buffer;
+ Q_ASSERT(bufferSize.height() >= pendingGlyph.bufferSize.height());
- pendingGlyph.buffer = bufferId;
- pendingGlyph.position = positions.at(i);
- pendingGlyph.bufferSize = bufferSize;
+ pendingGlyph.buffer = bufferId;
+ pendingGlyph.position = positions.at(i);
+ pendingGlyph.bufferSize = bufferSize;
- m_sharedGraphicsCache->referenceBuffer(bufferId);
- if (oldBuffer != 0)
- m_sharedGraphicsCache->dereferenceBuffer(oldBuffer);
+ m_sharedGraphicsCache->referenceBuffer(bufferId);
+ if (oldBuffer != 0)
+ m_sharedGraphicsCache->dereferenceBuffer(oldBuffer);
- m_requestedGlyphsThatHaveNotBeenReturned.remove(itemIds.at(i));
+ m_requestedGlyphsThatHaveNotBeenReturned.remove(itemIds.at(i));
+ }
}
}
if (m_cacheId != cacheId)
return;
- for (int i=0; i<itemIds.size(); ++i)
- m_pendingInvalidatedGlyphs.insert(itemIds.at(i));
+ for (int i=0; i<itemIds.size(); ++i) {
+ if (m_requestedGlyphs.contains(itemIds.at(i)))
+ m_pendingInvalidatedGlyphs.insert(itemIds.at(i));
+ }
}
emit glyphsPending();
#endif
for (int i=0; i<itemIds.size(); ++i) {
- m_pendingMissingGlyphs.insert(itemIds.at(i));
- m_requestedGlyphsThatHaveNotBeenReturned.remove(itemIds.at(i));
+ if (m_requestedGlyphsThatHaveNotBeenReturned.remove(itemIds.at(i)))
+ m_pendingMissingGlyphs.insert(itemIds.at(i));
}
}