diff options
author | mtklein <mtklein@chromium.org> | 2015-11-16 09:08:21 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-16 09:08:21 -0800 |
commit | 540e95483d285b555e9b1a73d18c16e7d7c0deba (patch) | |
tree | ed0b5c3e816c1016913ff0773887d970afb42d0c /src/gpu/GrProgramDesc.h | |
parent | e004bfc0a5e28cc083158f1a75e981ffd58a8134 (diff) |
Switch uses of SkChecksum::Compute to Murmur3.
SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.
The only interesting stuff is in src/gpu.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac
Review URL: https://codereview.chromium.org/1436973003
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r-- | src/gpu/GrProgramDesc.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h index 05b52cc7cd..9641195354 100644 --- a/src/gpu/GrProgramDesc.h +++ b/src/gpu/GrProgramDesc.h @@ -107,8 +107,7 @@ protected: *(this->atOffset<uint32_t, GrProgramDesc::kLengthOffset>()) = SkToU32(keyLength); uint32_t* checksum = this->atOffset<uint32_t, GrProgramDesc::kChecksumOffset>(); - *checksum = 0; - *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), keyLength); + *checksum = SkChecksum::Murmur3(fKey.begin(), keyLength); } // The key, stored in fKey, is composed of four parts: |