Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a207962 authored by John Reck's avatar John Reck
Browse files

Drop all caches in UI_HIDDEN

Bug: 137853925
Test: none
Change-Id: Idf7002d9b07cc6b71b38ce76e7b6382100279a99
parent 781630e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ void CacheManager::trimStaleResources() {
        return;
        return;
    }
    }
    mGrContext->flush();
    mGrContext->flush();
    mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30));
    mGrContext->performDeferredCleanup(std::chrono::seconds(30));
}
}


sp<skiapipeline::VectorDrawableAtlas> CacheManager::acquireVectorDrawableAtlas() {
sp<skiapipeline::VectorDrawableAtlas> CacheManager::acquireVectorDrawableAtlas() {
+3 −3
Original line number Original line Diff line number Diff line
@@ -646,11 +646,11 @@ void CanvasContext::trimMemory(RenderThread& thread, int level) {
    ATRACE_CALL();
    ATRACE_CALL();
    if (!thread.getGrContext()) return;
    if (!thread.getGrContext()) return;
    ATRACE_CALL();
    ATRACE_CALL();
    if (level >= TRIM_MEMORY_COMPLETE) {
    if (level >= TRIM_MEMORY_UI_HIDDEN) {
        thread.cacheManager().trimMemory(CacheManager::TrimMemoryMode::Complete);
        thread.cacheManager().trimMemory(CacheManager::TrimMemoryMode::Complete);
    }
    if (level >= TRIM_MEMORY_COMPLETE) {
        thread.destroyRenderingContext();
        thread.destroyRenderingContext();
    } else if (level >= TRIM_MEMORY_UI_HIDDEN) {
        thread.cacheManager().trimMemory(CacheManager::TrimMemoryMode::UiHidden);
    }
    }
}
}