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

Function NextPowerOfTwo

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

From Box2D

Source from the content-addressed store, hash-verified

518
519 // From Box2D
520 inline uint32_t NextPowerOfTwo(uint32_t x)
521 {
522 x |= (x >> 1);
523 x |= (x >> 2);
524 x |= (x >> 4);
525 x |= (x >> 8);
526 x |= (x >> 16);
527 return x + 1;
528 }
529
530 static bool GetNextCacheSize(HFontMap font_map, uint16_t* width, uint16_t* height)
531 {

Callers 2

GetNextCacheSizeFunction · 0.85
ResetCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected