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

Method purgeUntilMemoryTo

src/gpu/ResourceCache.cpp:63–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63bool ResourceCache::purgeUntilMemoryTo(size_t bytesLimit) {
64 processUnreferencedResources();
65 purgeResourcesByLRU(false, [&](Resource*) { return totalBytes <= bytesLimit; });
66 return totalBytes <= bytesLimit;
67}
68
69void ResourceCache::advanceFrameAndPurge() {
70 currentFrameTime = std::chrono::steady_clock::now();

Callers 2

TGFX_TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TGFX_TESTFunction · 0.64