diff options
author | Derek Sollenberger <djsollen@google.com> | 2017-05-24 11:41:33 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-24 17:08:45 +0000 |
commit | ee47914ae5661043c20754f46523665a6d31bc73 (patch) | |
tree | 09ec5b6618dbf939942f7ae37bd38bc616650926 /src/gpu/GrResourceCache.h | |
parent | 8785df15fe5a57651597d138d3c5aea0ffe3f661 (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/GrResourceCache.h')
-rw-r--r-- | src/gpu/GrResourceCache.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h index 71070ee6e9..6362c37e09 100644 --- a/src/gpu/GrResourceCache.h +++ b/src/gpu/GrResourceCache.h @@ -93,6 +93,11 @@ public: size_t getResourceBytes() const { return fBytes; } /** + * Returns the number of bytes held by unlocked reosources which are available for purging. + */ + size_t getPurgeableBytes() const { return fPurgeableBytes; } + + /** * Returns the number of bytes consumed by budgeted resources. */ size_t getBudgetedResourceBytes() const { return fBudgetedBytes; } @@ -331,6 +336,7 @@ private: // our current stats for resources that count against the budget int fBudgetedCount; size_t fBudgetedBytes; + size_t fPurgeableBytes; bool fRequestFlush; uint32_t fExternalFlushCnt; |