Index: src/core/SkResourceCache.h |
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h |
index 0873bd4c2efa099cd68ca53c18e9259d40d7b46e..f2fd8fc047443b64e0688c28cf3804ec78fbfbed 100644 |
--- a/src/core/SkResourceCache.h |
+++ b/src/core/SkResourceCache.h |
@@ -64,10 +64,10 @@ public: |
virtual ~Rec() {} |
uint32_t getHash() const { return this->getKey().hash(); } |
- |
+ |
virtual const Key& getKey() const = 0; |
virtual size_t bytesUsed() const = 0; |
- |
+ |
// for SkTDynamicHash::Traits |
static uint32_t Hash(const Key& key) { return key.hash(); } |
static const Key& GetKey(const Rec& rec) { return rec.getKey(); } |
@@ -77,7 +77,7 @@ public: |
Rec* fPrev; |
int32_t fLockCount; |
int32_t fPad; |
- |
+ |
friend class SkResourceCache; |
}; |
@@ -106,6 +106,10 @@ public: |
static size_t SetSingleAllocationByteLimit(size_t); |
static size_t GetSingleAllocationByteLimit(); |
+ /** |
+ * Use this allocator for bitmaps, so they can use ashmem when available. |
+ * Returns NULL if the ResourceCache has not been initialized with a DiscardableFactory. |
+ */ |
static SkBitmap::Allocator* GetAllocator(); |
/** |