Index: src/core/SkPictureFlat.h |
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h |
index f63b9c10a72495c1fe22758ae035c9e990cc621d..49281146607a71674939920d2f78ceee0e04df5b 100644 |
--- a/src/core/SkPictureFlat.h |
+++ b/src/core/SkPictureFlat.h |
@@ -335,9 +335,10 @@ public: |
} |
private: |
- // For SkTDynamicHash. |
- static const SkFlatData& Identity(const SkFlatData& flat) { return flat; } |
- static uint32_t Hash(const SkFlatData& flat) { return flat.checksum(); } |
+ struct HashTraits { |
+ static const SkFlatData& GetKey(const SkFlatData& flat) { return flat; } |
+ static uint32_t Hash(const SkFlatData& flat) { return flat.checksum(); } |
+ }; |
void setIndex(int index) { fIndex = index; } |
uint8_t* data() { return (uint8_t*)this + sizeof(*this); } |
@@ -563,7 +564,7 @@ private: |
SkTDArray<const SkFlatData*> fIndexedData; |
// For SkFlatData -> cached SkFlatData, which has index(). |
- SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::Identity, SkFlatData::Hash> fHash; |
+ SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash; |
}; |
typedef SkFlatDictionary<SkPaint, SkPaint::FlatteningTraits> SkPaintDictionary; |