Merge "Unpin bitmaps but don't purge all scratch resources." into pi-dev

am: 1c70ecb455

Change-Id: Ia10cec1f06051620b39869265ad386a63b5434e9
This commit is contained in:
Derek Sollenberger
2018-04-16 10:27:40 -07:00
committed by android-build-merger
2 changed files with 2 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ TaskManager* SkiaPipeline::getTaskManager() {
}
void SkiaPipeline::onDestroyHardwareResources() {
unpinImages();
mRenderThread.cacheManager().trimStaleResources();
}

View File

@@ -166,10 +166,7 @@ void CacheManager::trimStaleResources() {
return;
}
mGrContext->flush();
// Here we purge all the unlocked scratch resources (leaving those resources w/ persistent data)
// and then purge those w/ persistent data based on age.
mGrContext->purgeUnlockedResources(true);
mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(10));
mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30));
}
sp<skiapipeline::VectorDrawableAtlas> CacheManager::acquireVectorDrawableAtlas() {