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

Function UpdateCacheTexture

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

Source from the content-addressed store, hash-verified

581 }
582
583 void UpdateCacheTexture(HFontMap font_map)
584 {
585 DM_MUTEX_SCOPED_LOCK(font_map->m_Mutex);
586 bool texture_too_small = IsTextureTooSmall(font_map);
587 bool update_cache = font_map->m_IsCacheSizeDirty || texture_too_small;
588
589 if (update_cache)
590 {
591 ResetCache(font_map, font_map->m_GraphicsContext, texture_too_small,
592 font_map->m_CacheCellWidth, font_map->m_CacheCellHeight, font_map->m_CacheCellMaxAscent);
593 font_map->m_IsCacheSizeDirty = 0;
594 }
595 }
596
597 static void UpdateGlyphTexture(HFontMap font_map, FontGlyph* g, int32_t x, int32_t y, int offset_y)
598 {

Callers 1

CreateFontRenderBatchFunction · 0.85

Calls 2

IsTextureTooSmallFunction · 0.85
ResetCacheFunction · 0.85

Tested by

no test coverage detected