MCPcopy Create free account
hub / github.com/Tencent/tgfx / removeExpiredKeys

Method removeExpiredKeys

src/core/Atlas.cpp:270–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void Atlas::removeExpiredKeys() {
271 constexpr size_t kMaxKeys = 20000;
272 if (cellLocators.size() < kMaxKeys || expiredKeys.empty()) {
273 return;
274 }
275 for (auto it = cellLocators.begin(); it != cellLocators.end();) {
276 if (expiredKeys.find(it->first) != expiredKeys.end()) {
277 it = cellLocators.erase(it);
278 } else {
279 ++it;
280 }
281 }
282 expiredKeys.clear();
283}
284
285AtlasConfig::AtlasConfig(int maxTextureSize) {
286 RGBADimensions.set(std::min(MaxTextureSize, maxTextureSize),

Callers 1

preFlushMethod · 0.80

Calls 6

sizeMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected