From 8a207962ec84904a0fb8c7b5ce547ed2d1b59794 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 4 Oct 2019 13:30:51 -0700 Subject: Drop all caches in UI_HIDDEN Bug: 137853925 Test: none Change-Id: Idf7002d9b07cc6b71b38ce76e7b6382100279a99 --- libs/hwui/renderthread/CacheManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/renderthread/CacheManager.cpp') diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index fc268138e071..20e607dfe6c0 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -135,7 +135,7 @@ void CacheManager::trimStaleResources() { return; } mGrContext->flush(); - mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30)); + mGrContext->performDeferredCleanup(std::chrono::seconds(30)); } sp CacheManager::acquireVectorDrawableAtlas() { -- cgit v1.2.3 From 05ac51641297ae2cbe9b186b8c369f3a23a156b9 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 4 Oct 2019 13:47:55 -0700 Subject: Drop max texture cache size from 12x to 5x Bug: 137853925 Test: none Change-Id: I8d05871a5f54c8e5d6528a6a8ed48f73464a1221 --- libs/hwui/renderthread/CacheManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/renderthread/CacheManager.cpp') diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index 20e607dfe6c0..dc07f0d84d18 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -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) -- cgit v1.2.3 From e5e4a8f97f2c8affbd620c90ffe300f67dc8c414 Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 8 Oct 2019 23:28:41 +0000 Subject: Revert "Drop all caches in UI_HIDDEN" This reverts commit 8a207962ec84904a0fb8c7b5ce547ed2d1b59794. Bug: 142301356 Test: none, speculative Reason for revert: Seems to break alarm? Change-Id: Ia1680d1a937b596297c2eab3e54476daf9589347 (cherry picked from commit f846aeec9d87cb0cef58061d400efe3af7008903) --- libs/hwui/renderthread/CacheManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/renderthread/CacheManager.cpp') diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index dc07f0d84d18..8eb81533fda8 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -135,7 +135,7 @@ void CacheManager::trimStaleResources() { return; } mGrContext->flush(); - mGrContext->performDeferredCleanup(std::chrono::seconds(30)); + mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30)); } sp CacheManager::acquireVectorDrawableAtlas() { -- cgit v1.2.3