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

Function GetNextCacheSize

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

Source from the content-addressed store, hash-verified

528 }
529
530 static bool GetNextCacheSize(HFontMap font_map, uint16_t* width, uint16_t* height)
531 {
532 const uint16_t max_width = font_map->m_CacheMaxWidth;
533 const uint16_t max_height = font_map->m_CacheMaxHeight;
534 if (*height <= *width)
535 *height = NextPowerOfTwo(*height);
536 else
537 *width = NextPowerOfTwo(*width);
538
539 return *width <= max_width && *height <= max_height;
540 }
541
542 static void ResetCache(HFontMap font_map, dmGraphics::HContext graphics_context, bool recreate_texture,
543 uint16_t cell_width, uint16_t cell_height, uint16_t max_ascent)

Callers 2

ResetCacheFunction · 0.85
CanCacheTextureGrowFunction · 0.85

Calls 1

NextPowerOfTwoFunction · 0.85

Tested by

no test coverage detected