Index: src/core/SkScaledImageCache.h |
diff --git a/src/core/SkScaledImageCache.h b/src/core/SkScaledImageCache.h |
index fee69d2d58598eb8fee6a7562a45bd2940912e6f..d07a584b915a7ba91ca926237094f45c3410bb69 100644 |
--- a/src/core/SkScaledImageCache.h |
+++ b/src/core/SkScaledImageCache.h |
@@ -31,6 +31,8 @@ public: |
* instance of this cache. |
*/ |
+ static SkScaledImageCache* GetGlobalInstance(); |
+ |
static ID* FindAndLock(uint32_t pixelGenerationID, |
int32_t width, |
int32_t height, |
@@ -59,7 +61,7 @@ public: |
/////////////////////////////////////////////////////////////////////////// |
- SkScaledImageCache(size_t byteLimit); |
+ SkScaledImageCache(size_t byteLimit, SkBaseMutex* mutex = NULL); |
~SkScaledImageCache(); |
/** |
@@ -114,8 +116,8 @@ public: |
*/ |
void unlock(ID*); |
- size_t getBytesUsed() const { return fBytesUsed; } |
- size_t getByteLimit() const { return fByteLimit; } |
+ size_t getBytesUsed() const; |
+ size_t getByteLimit() const; |
/** |
* Set the maximum number of bytes available to this cache. If the current |
@@ -127,6 +129,8 @@ public: |
public: |
struct Rec; |
private: |
+ SkBaseMutex* fMutex; // can be NULL |
+ |
Rec* fHead; |
Rec* fTail; |
@@ -154,3 +158,4 @@ private: |
#endif |
}; |
#endif |
+ |