Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: dm/DM.cpp

Issue 1021033002: Some usability ideas around SkTHash. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor tweaks Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkChecksum.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 109a00de442e9f277fcd0d8276ed2e8ee659ac62..833af0edbaa267c8ac9be4314a79be0443051e0a 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -104,13 +104,8 @@ struct Gold : public SkString {
this->append(src);
this->append(name);
this->append(md5);
- while (this->size() % 4) {
- this->append("!"); // Pad out if needed so we can pass this to Murmur3.
- }
- }
- static uint32_t Hash(const Gold& g) {
- return SkChecksum::Murmur3((const uint32_t*)g.c_str(), g.size());
}
+ static uint32_t Hash(const Gold& g) { return SkGoodHash((const SkString&)g); }
};
static SkTHashSet<Gold, Gold::Hash> gGold;
« no previous file with comments | « no previous file | src/core/SkChecksum.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698