| Index: include/gpu/GrCacheable.h
|
| diff --git a/include/gpu/GrCacheable.h b/include/gpu/GrCacheable.h
|
| index 0efc7f7d61e805ada59ace13c873dd23a9536aa8..cacc7e7c9a908b155185c0d797df9dc47a216e2a 100644
|
| --- a/include/gpu/GrCacheable.h
|
| +++ b/include/gpu/GrCacheable.h
|
| @@ -62,13 +62,13 @@ public:
|
| * not change when the content of the GrCacheable object changes. This will never return
|
| * 0.
|
| */
|
| - uint32_t getGenerationID() const;
|
| + uint32_t getUniqueID() const { return fUniqueID; }
|
|
|
| protected:
|
| GrCacheable()
|
| : fRefCnt(1)
|
| , fCacheEntry(NULL)
|
| - , fGenID(0) {}
|
| + , fUniqueID(CreateUniqueID()) {}
|
|
|
| bool isInCache() const { return NULL != fCacheEntry; }
|
|
|
| @@ -81,9 +81,11 @@ protected:
|
| void didChangeGpuMemorySize() const;
|
|
|
| private:
|
| + static uint32_t CreateUniqueID();
|
| +
|
| mutable int32_t fRefCnt;
|
| GrResourceCacheEntry* fCacheEntry; // NULL if not in cache
|
| - mutable uint32_t fGenID;
|
| + const uint32_t fUniqueID;
|
|
|
| typedef SkNoncopyable INHERITED;
|
| };
|
|
|