aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkResourceCache.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-01-26 11:24:37 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-26 11:24:37 -0800
commit1d9e80f02b8260ffe2eb1944042cd79f10e38d43 (patch)
tree3d4d7d57dac5d0debc91ec23076e71e1133940a0 /src/core/SkResourceCache.h
parent878fa0204bc246ec5fbaca4aa3c81aaefccc30a1 (diff)
check effective cache-size for fixed-budget caches
Diffstat (limited to 'src/core/SkResourceCache.h')
-rw-r--r--src/core/SkResourceCache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h
index 883ed189de..88ccb87ed8 100644
--- a/src/core/SkResourceCache.h
+++ b/src/core/SkResourceCache.h
@@ -123,6 +123,7 @@ public:
static size_t SetSingleAllocationByteLimit(size_t);
static size_t GetSingleAllocationByteLimit();
+ static size_t GetEffectiveSingleAllocationByteLimit();
static void PurgeAll();
@@ -186,6 +187,10 @@ public:
*/
size_t setSingleAllocationByteLimit(size_t maximumAllocationSize);
size_t getSingleAllocationByteLimit() const;
+ // returns the logical single allocation size (pinning against the budget when the cache
+ // is not backed by discardable memory.
+ size_t getEffectiveSingleAllocationByteLimit() const;
+
/**
* Set the maximum number of bytes available to this cache. If the current
* cache exceeds this new value, it will be purged to try to fit within