Chromium Code Reviews| Index: src/gpu/GrResourceCache.h |
| diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h |
| index 38378ac77130ffdf45c522ef24ee9474d2aa0bb3..532f7ffc11afe2ee1f73bca37c65057ad82cb5a1 100644 |
| --- a/src/gpu/GrResourceCache.h |
| +++ b/src/gpu/GrResourceCache.h |
| @@ -82,18 +82,6 @@ public: |
| kResourceFlagsOffset); |
| } |
| - int compare(const GrResourceKey& other) const { |
| - return fKey.fHashedKey.compare(other.fKey.fHashedKey); |
| - } |
| - |
| - static bool LT(const GrResourceKey& a, const GrResourceKey& b) { |
| - return a.compare(b) < 0; |
| - } |
| - |
| - static bool EQ(const GrResourceKey& a, const GrResourceKey& b) { |
| - return 0 == a.compare(b); |
| - } |
| - |
| inline static bool LT(const GrResourceEntry& entry, const GrResourceKey& key); |
| inline static bool EQ(const GrResourceEntry& entry, const GrResourceKey& key); |
| inline static bool LT(const GrResourceEntry& a, const GrResourceEntry& b); |
| @@ -132,10 +120,6 @@ private: |
| typedef GrTBinHashKey<Key, kKeySize> HashedKey; |
| struct Key { |
| - int compare(const HashedKey& hashedKey) const { |
| - return fHashedKey.compare(hashedKey); |
|
mtklein
2013/11/26 14:20:43
Does this intermediate Key struct really need to e
Kimmo Kinnunen
2013/11/27 08:16:54
Well, it might not be the only thing in this const
|
| - } |
| - |
| HashedKey fHashedKey; |
| }; |
| @@ -175,19 +159,19 @@ private: |
| }; |
| bool GrResourceKey::LT(const GrResourceEntry& entry, const GrResourceKey& key) { |
| - return LT(entry.key(), key); |
| + return entry.key().fKey.fHashedKey.LT(key.fKey.fHashedKey); |
| } |
| bool GrResourceKey::EQ(const GrResourceEntry& entry, const GrResourceKey& key) { |
| - return EQ(entry.key(), key); |
| + return entry.key().fKey.fHashedKey.EQ(key.fKey.fHashedKey); |
| } |
| bool GrResourceKey::LT(const GrResourceEntry& a, const GrResourceEntry& b) { |
| - return LT(a.key(), b.key()); |
| + return LT(a, b.key()); |
| } |
| bool GrResourceKey::EQ(const GrResourceEntry& a, const GrResourceEntry& b) { |
| - return EQ(a.key(), b.key()); |
| + return EQ(a, b.key()); |
| } |
| /////////////////////////////////////////////////////////////////////////////// |