Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: src/core/SkResourceCache.h

Issue 668223002: SkResourceCache::Key namespace support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: unused SkPictureShader headers Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.h
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h
index c50b370eafd927e0aa8fe19bdb7183502ebb3e46..c16913fbe7aea5a6abe47fc500dd9fbc6fb70a0d 100644
--- a/src/core/SkResourceCache.h
+++ b/src/core/SkResourceCache.h
@@ -31,8 +31,9 @@ public:
void* writableContents() { return this + 1; }
// must call this after your private data has been written.
+ // nameSpace must be unique per Key subclass.
// length must be a multiple of 4
- void init(size_t length);
+ void init(void* nameSpace, size_t length);
// This is only valid after having called init().
uint32_t hash() const { return fHash; }
@@ -49,8 +50,9 @@ public:
}
private:
- int32_t fCount32; // 2 + user contents count32
+ int32_t fCount32; // local + user contents count32
uint32_t fHash;
+ void* fNamespace; // A unique namespace tag. This is hashed.
/* uint32_t fContents32[] */
const uint32_t* as32() const { return (const uint32_t*)this; }
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698