aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProgramDesc.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-11-16 11:16:23 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-16 11:16:23 -0800
commit56da02502019cfbb817898e37e320539b9838e2b (patch)
tree05e55fc33a38394f582b3fae0f91b3f9affaacd3 /src/gpu/GrProgramDesc.h
parent504ce5dc772e14be2f5697b00ac82fcf82127763 (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 Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba Review URL: https://codereview.chromium.org/1436973003
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r--src/gpu/GrProgramDesc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 05b52cc7cd..15106305fa 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -107,8 +107,8 @@ 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 = 0; // We'll hash through these bytes, so make sure they're initialized.
+ *checksum = SkChecksum::Murmur3(fKey.begin(), keyLength);
}
// The key, stored in fKey, is composed of four parts: