aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-03-28 12:25:42 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-28 18:56:14 +0000
commit6eba063b63efbf824aff8ec6b32af05e4d54c38b (patch)
treeb3b5ef8a90cd5757ae0fe40caf3471ae6289a96e /src/gpu/GrContext.cpp
parentaa5da735fa27cdb60f55f94bbd2149727c9c0728 (diff)
Add new GrResourceCache::purgeUnlockedResources variant
TBR=bsalomon@google.com Change-Id: I05bef1f8a271474db878a046cc1f6ac7b60a15f1 Reviewed-on: https://skia-review.googlesource.com/116801 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 3baf0b9737..db13931b2b 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -254,6 +254,13 @@ void GrContext::freeGpuResources() {
fResourceCache->purgeAllUnlocked();
}
+void GrContext::purgeUnlockedResources(bool scratchResourcesOnly) {
+ ASSERT_SINGLE_OWNER
+ fResourceCache->purgeUnlockedResources(scratchResourcesOnly);
+ fResourceCache->purgeAsNeeded();
+ fTextBlobCache->purgeStaleBlobs();
+}
+
void GrContext::performDeferredCleanup(std::chrono::milliseconds msNotUsed) {
ASSERT_SINGLE_OWNER
fResourceCache->purgeAsNeeded();