Index: src/gpu/effects/GrTextureStripAtlas.h |
diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h |
index e56e736d7716c4e87d1f5ce495031954bb71059e..e06e273e26b6dbbd2707ccfc3bb5270d24bc23c6 100644 |
--- a/src/gpu/effects/GrTextureStripAtlas.h |
+++ b/src/gpu/effects/GrTextureStripAtlas.h |
@@ -136,12 +136,15 @@ private: |
// Hash table entry for atlases |
class AtlasEntry; |
- typedef GrTBinHashKey<AtlasEntry, sizeof(GrTextureStripAtlas::Desc)> AtlasHashKey; |
+ class AtlasHashKey : public GrBinHashKey<sizeof(GrTextureStripAtlas::Desc)> { |
+ public: |
+ static bool Equals(const AtlasEntry& entry, const AtlasHashKey& key); |
+ static bool LessThan(const AtlasEntry& entry, const AtlasHashKey& key); |
+ }; |
class AtlasEntry : public ::SkNoncopyable { |
public: |
AtlasEntry() : fAtlas(NULL) {} |
~AtlasEntry() { SkDELETE(fAtlas); } |
- int compare(const AtlasHashKey& key) const { return fKey.compare(key); } |
AtlasHashKey fKey; |
GrTextureStripAtlas* fAtlas; |
}; |
@@ -178,4 +181,14 @@ private: |
SkTDArray<AtlasRow*> fKeyTable; |
}; |
+inline bool GrTextureStripAtlas::AtlasHashKey::Equals(const AtlasEntry& entry, |
+ const AtlasHashKey& key) { |
+ return entry.fKey == key; |
+} |
+ |
+inline bool GrTextureStripAtlas::AtlasHashKey::LessThan(const AtlasEntry& entry, |
+ const AtlasHashKey& key) { |
+ return entry.fKey < key; |
+} |
+ |
#endif |