| 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 | { |