diff options
author | mtklein <mtklein@google.com> | 2014-07-09 14:18:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-09 14:18:52 -0700 |
commit | 1feac79203605c146671b731cb891b3c6eb49939 (patch) | |
tree | b76d580d3bf810a829aa8959ca3b1ae4cc12ff0a /bench/FontCacheBench.cpp | |
parent | e4636aa17307b00c76e228fc5ddda1bd4904e0dd (diff) |
Revert of Slim Skia down to just one murmur3 implementation. (https://codereview.chromium.org/376183004/)
Reason for revert:
Valgrind unhappy. skia:2735
Original issue's description:
> Slim Skia down to just one murmur3 implementation.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/6ac0037b70410ff7d5ce5788bc89314223e1a587
R=reed@google.com, mtklein@chromium.org
TBR=mtklein@chromium.org, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/378413002
Diffstat (limited to 'bench/FontCacheBench.cpp')
-rw-r--r-- | bench/FontCacheBench.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp index 697bde64f4..0e75c9cb17 100644 --- a/bench/FontCacheBench.cpp +++ b/bench/FontCacheBench.cpp @@ -7,7 +7,6 @@ #include "Benchmark.h" #include "SkCanvas.h" -#include "SkChecksum.h" #include "SkFontHost.h" #include "SkPaint.h" #include "SkString.h" @@ -65,12 +64,23 @@ static uint32_t hasher0(uint32_t value) { return value ^ (value >> 8); } +static uint32_t hasher2(uint32_t h) { + h ^= h >> 16; + h *= 0x85ebca6b; + h ^= h >> 13; + h *= 0xc2b2ae35; + h ^= h >> 16; + + h ^= (h >> 8); + return h; +} + static const struct { const char* fName; HasherProc fHasher; } gRec[] = { { "hasher0", hasher0 }, - { "hasher2", SkChecksum::Mix }, + { "hasher2", hasher2 }, }; #define kMaxHashBits 12 |