diff options
Diffstat (limited to 'src/core/SkScaledImageCache.cpp')
-rw-r--r-- | src/core/SkScaledImageCache.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp index 147697af4e..8d34dfbcc3 100644 --- a/src/core/SkScaledImageCache.cpp +++ b/src/core/SkScaledImageCache.cpp @@ -129,17 +129,19 @@ struct SkScaledImageCache::Rec { #include "SkTDynamicHash.h" -static const Key& key_from_rec(const SkScaledImageCache::Rec& rec) { +namespace { // can't use static functions w/ template parameters +const Key& key_from_rec(const SkScaledImageCache::Rec& rec) { return rec.fKey; } -static uint32_t hash_from_key(const Key& key) { +uint32_t hash_from_key(const Key& key) { return key.fHash; } -static bool eq_rec_key(const SkScaledImageCache::Rec& rec, const Key& key) { +bool eq_rec_key(const SkScaledImageCache::Rec& rec, const Key& key) { return rec.fKey == key; } +} class SkScaledImageCache::Hash : public SkTDynamicHash<SkScaledImageCache::Rec, Key, key_from_rec, hash_from_key, |