| 167 | } |
| 168 | |
| 169 | static uint32_t TTFSurfaceCacheHash(TTF_Font* font, std::string_view text) |
| 170 | { |
| 171 | uint32_t hash = static_cast<uint32_t>(((reinterpret_cast<uintptr_t>(font) * 23) ^ 0xAAAAAAAA) & 0xFFFFFFFF); |
| 172 | for (auto c : text) |
| 173 | { |
| 174 | hash = Numerics::ror32(hash, 3) ^ (c * 13); |
| 175 | } |
| 176 | return hash; |
| 177 | } |
| 178 | |
| 179 | static void TTFSurfaceCacheDispose(ttf_cache_entry* entry) |
| 180 | { |
no outgoing calls
no test coverage detected