Index: include/gpu/GrResourceKey.h |
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h |
index 50a71459290574dd107262274aa96dbdcd1db392..a353dc21143766f0a1cb7a2a598e9c55dc2c375b 100644 |
--- a/include/gpu/GrResourceKey.h |
+++ b/include/gpu/GrResourceKey.h |
@@ -46,7 +46,10 @@ protected: |
} |
bool operator==(const GrResourceKey& that) const { |
- return 0 == memcmp(fKey.get(), that.fKey.get(), this->size()); |
+ return this->hash() == that.hash() && |
+ 0 == memcmp(&fKey[kHash_MetaDataIdx + 1], |
+ &that.fKey[kHash_MetaDataIdx + 1], |
+ this->internalSize() - sizeof(uint32_t)); |
} |
GrResourceKey& operator=(const GrResourceKey& that) { |