diff options
| author | 2023-04-03 18:47:03 -0700 | |
|---|---|---|
| committer | 2023-04-07 20:12:33 +0000 | |
| commit | 328ff437c1440d31c6b6f5e70a1d63048e2a9038 (patch) | |
| tree | 736c495ff114c81e705583b8588a5dc2508e7e66 | |
| parent | 6555162bac5365a575b5312876269fe7630a2ae0 (diff) | |
hwui: change TRIM_COMPLETE to TRIM_BACKGROUND
In preparation for lifecycle-consistent TRIM_MEMORY callbacks, be more
aggressive with TRIM_BACKGROUND.
Test: android.platform.test.scenario.launcher.FlingAllAppsMicrobenchmark
Bug: 253914117
Change-Id: I4c8b3331312f198dbf3f74495b8412873d1ca302
| -rw-r--r-- | libs/hwui/renderthread/CacheManager.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index 23611efccd73..7e9d44fbdbd1 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -117,12 +117,8 @@ void CacheManager::trimMemory(TrimLevel mode) { // flush and submit all work to the gpu and wait for it to finish mGrContext->flushAndSubmit(/*syncCpu=*/true); - if (!Properties::isHighEndGfx && mode >= TrimLevel::MODERATE) { - mode = TrimLevel::COMPLETE; - } - switch (mode) { - case TrimLevel::COMPLETE: + case TrimLevel::BACKGROUND: mGrContext->freeGpuResources(); SkGraphics::PurgeAllCaches(); mRenderThread.destroyRenderingContext(); |