diff options
author | Robert Phillips <robertphillips@google.com> | 2019-09-06 13:18:17 -0400 |
---|---|---|
committer | Robert Phillips <robertphillips@google.com> | 2019-09-06 13:22:11 -0400 |
commit | 57bb0bfb4435bd214dffc9c38501781bdbd16f7d (patch) | |
tree | 2b43978e2738b4f438eb15bc59d9ad4365270461 /libs/hwui/renderthread/CacheManager.cpp | |
parent | d5c504d58781b6dd8649bf5a95aa5ae60c0e10ae (diff) |
Switch to using GrContext::setResourceCacheLimit and getResourceCacheLimit
The old version that took a maxResourceCount are now deprecated
Test: does it compile
Change-Id: Ib4d69c8907169329c7765c648f46fa5e4a10bf7a
Diffstat (limited to 'libs/hwui/renderthread/CacheManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/CacheManager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index 5469a6810c87..fc268138e071 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -69,8 +69,7 @@ void CacheManager::reset(sk_sp<GrContext> context) { if (context) { mGrContext = std::move(context); - mGrContext->getResourceCacheLimits(&mMaxResources, nullptr); - mGrContext->setResourceCacheLimits(mMaxResources, mMaxResourceBytes); + mGrContext->setResourceCacheLimit(mMaxResourceBytes); } } @@ -119,8 +118,8 @@ void CacheManager::trimMemory(TrimMemoryMode mode) { // limits between the background and max amounts. This causes the unlocked resources // that have persistent data to be purged in LRU order. mGrContext->purgeUnlockedResources(true); - mGrContext->setResourceCacheLimits(mMaxResources, mBackgroundResourceBytes); - mGrContext->setResourceCacheLimits(mMaxResources, mMaxResourceBytes); + mGrContext->setResourceCacheLimit(mBackgroundResourceBytes); + mGrContext->setResourceCacheLimit(mMaxResourceBytes); SkGraphics::SetFontCacheLimit(mBackgroundCpuFontCacheBytes); SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes); break; |