aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/FontCacheBench.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-07-10 06:03:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-10 06:03:46 -0700
commit67a3271f0de9ccc32d559b042b862528272047cc (patch)
tree76624b22b777358d7bcaa88f8bfe695a6d319d18 /bench/FontCacheBench.cpp
parentc7d29c86b244d468b81f57ca5c58de905295886a (diff)
Slim Skia down to just one murmur3 implementation.
BUG=skia: Committed: https://skia.googlesource.com/skia/+/6ac0037b70410ff7d5ce5788bc89314223e1a587 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/376183004
Diffstat (limited to 'bench/FontCacheBench.cpp')
-rw-r--r--bench/FontCacheBench.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp
index 0e75c9cb17..697bde64f4 100644
--- a/bench/FontCacheBench.cpp
+++ b/bench/FontCacheBench.cpp
@@ -7,6 +7,7 @@
#include "Benchmark.h"
#include "SkCanvas.h"
+#include "SkChecksum.h"
#include "SkFontHost.h"
#include "SkPaint.h"
#include "SkString.h"
@@ -64,23 +65,12 @@ 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", hasher2 },
+ { "hasher2", SkChecksum::Mix },
};
#define kMaxHashBits 12