diff options
author | mtklein <mtklein@google.com> | 2015-11-13 07:07:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-13 07:07:47 -0800 |
commit | 0274efbd3d2c3b2fba2b4212347159a20050038d (patch) | |
tree | 938361c44fba7b2f2b2f8bde112833df571258b0 /src/gpu/GrProgramDesc.h | |
parent | 64c4728c70001ed074fecf5c4e083781987b12e9 (diff) |
Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )
Reason for revert:
I would not have expected this to change any images.
Looks like it's changed both MSAA and non-MSAA GMs:
1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac&unt=true&head=true&query=source_type%3Dgm">https://gold.skia.org/search2?blame=1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac&unt=true&head=true&query=source_type%3Dgm
Original issue's description:
> 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
TBR=bsalomon@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1445523003
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r-- | src/gpu/GrProgramDesc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h index 9641195354..05b52cc7cd 100644 --- a/src/gpu/GrProgramDesc.h +++ b/src/gpu/GrProgramDesc.h @@ -107,7 +107,8 @@ protected: *(this->atOffset<uint32_t, GrProgramDesc::kLengthOffset>()) = SkToU32(keyLength); uint32_t* checksum = this->atOffset<uint32_t, GrProgramDesc::kChecksumOffset>(); - *checksum = SkChecksum::Murmur3(fKey.begin(), keyLength); + *checksum = 0; + *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), keyLength); } // The key, stored in fKey, is composed of four parts: |