aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar Derek Sollenberger <djsollen@google.com>2017-05-24 11:41:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-24 17:08:45 +0000
commitee47914ae5661043c20754f46523665a6d31bc73 (patch)
tree09ec5b6618dbf939942f7ae37bd38bc616650926 /src/gpu/GrContext.cpp
parent8785df15fe5a57651597d138d3c5aea0ffe3f661 (diff)
Add GrContext API to report the number of purgeable bytes in the cache.
Change-Id: I1457eec9831736f386e3b3b80d9eac8dbb337a9b Reviewed-on: https://skia-review.googlesource.com/17829 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 1455800cbd..e7aff3586a 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -215,6 +215,11 @@ void GrContext::getResourceCacheUsage(int* resourceCount, size_t* resourceBytes)
}
}
+size_t GrContext::getResourceCachePurgeableBytes() const {
+ ASSERT_SINGLE_OWNER
+ return fResourceCache->getPurgeableBytes();
+}
+
////////////////////////////////////////////////////////////////////////////////
void GrContext::TextBlobCacheOverBudgetCB(void* data) {