From e4bf164225cc6d027566e9bfa0c8492629a6e090 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 13 Dec 2016 16:26:32 -0500 Subject: Port SkResourceCache to SkTHashTable We'd like to fix bugs and make performance improvements to our hash tables. It's a lot easier if we can focus on one implementation, so I'd like to move users of SkTDynamicHash to SkTHashTable, SkTHashMap, or SkTHashSet. This is roughly outlined in the attached Skia bug. In this case, the conversion from SkTDynamicHash to SkTHashTable is pretty trivial. The main change is that the values stored in the table are no longer assumed to be pointers, so we just need to sprinkle in a couple of * and ->. SkResourceCache is particularly interesting as the locus of the attached Chromium bug. Porting this now means SkResourceCache will get any fixes we make as soon as we make them. BUG=skia:6053,chromium:429375 Change-Id: If5dc8d331c62f1d4449fb8f9a7f7e9c746070213 Reviewed-on: https://skia-review.googlesource.com/5984 Reviewed-by: Herb Derby Commit-Queue: Mike Klein --- src/core/SkResourceCache.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/core/SkResourceCache.h') diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h index 5919336312..0ff627196e 100644 --- a/src/core/SkResourceCache.h +++ b/src/core/SkResourceCache.h @@ -86,10 +86,6 @@ public: virtual const char* getCategory() const = 0; virtual SkDiscardableMemory* diagnostic_only_getDiscardable() const { return nullptr; } - // for SkTDynamicHash::Traits - static uint32_t Hash(const Key& key) { return key.hash(); } - static const Key& GetKey(const Rec& rec) { return rec.getKey(); } - private: Rec* fNext; Rec* fPrev; -- cgit v1.2.3