Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b22ffad7 authored by Derek Sollenberger's avatar Derek Sollenberger Committed by android-build-merger
Browse files

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

am: 1c70ecb4

Change-Id: Ia10cec1f06051620b39869265ad386a63b5434e9
parents b019b0b3 1c70ecb4
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -53,6 +53,7 @@ TaskManager* SkiaPipeline::getTaskManager() {
}
}


void SkiaPipeline::onDestroyHardwareResources() {
void SkiaPipeline::onDestroyHardwareResources() {
    unpinImages();
    mRenderThread.cacheManager().trimStaleResources();
    mRenderThread.cacheManager().trimStaleResources();
}
}


+1 −4
Original line number Original line Diff line number Diff line
@@ -166,10 +166,7 @@ void CacheManager::trimStaleResources() {
        return;
        return;
    }
    }
    mGrContext->flush();
    mGrContext->flush();
    // Here we purge all the unlocked scratch resources (leaving those resources w/ persistent data)
    mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(30));
    // and then purge those w/ persistent data based on age.
    mGrContext->purgeUnlockedResources(true);
    mGrContext->purgeResourcesNotUsedInMs(std::chrono::seconds(10));
}
}


sp<skiapipeline::VectorDrawableAtlas> CacheManager::acquireVectorDrawableAtlas() {
sp<skiapipeline::VectorDrawableAtlas> CacheManager::acquireVectorDrawableAtlas() {