MCPcopy Create free account
hub / github.com/defold/defold / CompareCacheGlyphPred

Class CompareCacheGlyphPred

engine/render/src/render/font/fontmap.cpp:687–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685 }
686
687 struct CompareCacheGlyphPred
688 {
689 CacheGlyph* m_Glyphs;
690 CompareCacheGlyphPred(CacheGlyph* glyphs)
691 : m_Glyphs(glyphs) {}
692
693 bool operator()(uint16_t ia, uint16_t ib) const
694 {
695 const CacheGlyph& a = m_Glyphs[ia];
696 const CacheGlyph& b = m_Glyphs[ib];
697 // Sort the oldest last (e.g. 0 is at the end)
698 return a.m_Frame > b.m_Frame;
699 }
700 };
701
702 static void SortCache(HFontMap font_map)
703 {

Callers 1

SortCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected