Loading libs/hwui/renderthread/CacheManager.cpp +13 −18 Original line number Diff line number Diff line Loading @@ -124,13 +124,11 @@ void CacheManager::trimMemory(TrimLevel mode) { // flush and submit all work to the gpu and wait for it to finish mGrContext->flushAndSubmit(GrSyncCpu::kYes); switch (mode) { case TrimLevel::BACKGROUND: if (mode >= TrimLevel::BACKGROUND) { mGrContext->freeGpuResources(); SkGraphics::PurgeAllCaches(); mRenderThread.destroyRenderingContext(); break; case TrimLevel::UI_HIDDEN: } else if (mode == TrimLevel::UI_HIDDEN) { // Here we purge all the unlocked scratch resources and then toggle the resources cache // limits between the background and max amounts. This causes the unlocked resources // that have persistent data to be purged in LRU order. Loading @@ -139,9 +137,6 @@ void CacheManager::trimMemory(TrimLevel mode) { mGrContext->purgeUnlockedResources(toSkiaEnum(mMemoryPolicy.purgeScratchOnly)); mGrContext->setResourceCacheLimit(mMaxResourceBytes); SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes); break; default: break; } } Loading Loading
libs/hwui/renderthread/CacheManager.cpp +13 −18 Original line number Diff line number Diff line Loading @@ -124,13 +124,11 @@ void CacheManager::trimMemory(TrimLevel mode) { // flush and submit all work to the gpu and wait for it to finish mGrContext->flushAndSubmit(GrSyncCpu::kYes); switch (mode) { case TrimLevel::BACKGROUND: if (mode >= TrimLevel::BACKGROUND) { mGrContext->freeGpuResources(); SkGraphics::PurgeAllCaches(); mRenderThread.destroyRenderingContext(); break; case TrimLevel::UI_HIDDEN: } else if (mode == TrimLevel::UI_HIDDEN) { // Here we purge all the unlocked scratch resources and then toggle the resources cache // limits between the background and max amounts. This causes the unlocked resources // that have persistent data to be purged in LRU order. Loading @@ -139,9 +137,6 @@ void CacheManager::trimMemory(TrimLevel mode) { mGrContext->purgeUnlockedResources(toSkiaEnum(mMemoryPolicy.purgeScratchOnly)); mGrContext->setResourceCacheLimit(mMaxResourceBytes); SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes); break; default: break; } } Loading