From d6bab0238655dbab24dfe92bd0b16b464310a8c7 Mon Sep 17 00:00:00 2001 From: "rmistry@google.com" Date: Mon, 2 Dec 2013 13:50:38 +0000 Subject: Reverting r12427 git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/effects/GrTextureStripAtlas.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/gpu/effects/GrTextureStripAtlas.h') diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h index e56e736d77..e06e273e26 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 AtlasHashKey; + class AtlasHashKey : public GrBinHashKey { + 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 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 -- cgit v1.2.3