Index: src/core/SkResourceCache.h |
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h |
index a748133c964d74a2b8e3422c6e3c5563da9ddd3b..9e260a4d988d980d16bf3d2ea580bb4ad4d9ea2a 100644 |
--- a/src/core/SkResourceCache.h |
+++ b/src/core/SkResourceCache.h |
@@ -29,15 +29,17 @@ class SkTraceMemoryDump; |
class SkResourceCache { |
public: |
struct Key { |
- // Call this to access your private contents. Must not use the address after calling init() |
- void* writableContents() { return this + 1; } |
- |
// must call this after your private data has been written. |
// nameSpace must be unique per Key subclass. |
// sharedID == 0 means ignore this field : does not support group purging. |
// length must be a multiple of 4 |
void init(void* nameSpace, uint64_t sharedID, size_t length); |
+ /** Returns the size of this key. */ |
+ size_t length() { |
reed1
2016/02/17 14:12:52
size_t size() const { ...
bungeman-skia
2016/02/17 16:55:36
Heh, yes, http://stackoverflow.com/questions/30052
|
+ return fCount32 << 2; |
+ } |
+ |
void* getNamespace() const { return fNamespace; } |
uint64_t getSharedID() const { return ((uint64_t)fSharedID_hi << 32) | fSharedID_lo; } |