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

Commit 677044a8 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge changes I8d05871a,Idf7002d9

* changes:
  Drop max texture cache size from 12x to 5x
  Drop all caches in UI_HIDDEN
parents d42515af 05ac5164
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ namespace renderthread {
// to the screen resolution. This is meant to be a conservative default based on
// that analysis. The 4.0f is used because the default pixel format is assumed to
// be ARGB_8888.
#define SURFACE_SIZE_MULTIPLIER (12.0f * 4.0f)
#define SURFACE_SIZE_MULTIPLIER (5.0f * 4.0f)
#define BACKGROUND_RETENTION_PERCENTAGE (0.5f)

CacheManager::CacheManager(const DisplayInfo& display)
@@ -135,7 +135,7 @@ void CacheManager::trimStaleResources() {
        return;
    }
    mGrContext->flush();
    mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30));
    mGrContext->performDeferredCleanup(std::chrono::seconds(30));
}

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