Index: src/gpu/effects/GrTextureStripAtlas.h |
diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h |
index e56e736d7716c4e87d1f5ce495031954bb71059e..6e7025a5cb57d28978f2af76b3fbd319704f85e3 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); |
bsalomon
2013/11/27 14:46:01
I prefer the new names as well. But static functio
Kimmo Kinnunen
2013/11/28 07:38:34
Done.
|
+ 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,12 @@ private: |
SkTDArray<AtlasRow*> fKeyTable; |
}; |
+inline bool GrTextureStripAtlas::AtlasHashKey::equals(const AtlasEntry& entry, const AtlasHashKey& key) { |
mtklein
2013/11/27 14:36:54
Wrap these guys to 100 columns?
Kimmo Kinnunen
2013/11/28 07:38:34
Done.
|
+ return entry.fKey == key; |
+} |
+ |
+inline bool GrTextureStripAtlas::AtlasHashKey::lessThan(const AtlasEntry& entry, const AtlasHashKey& key) { |
+ return entry.fKey < key; |
+} |
+ |
#endif |