Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: bench/FontCacheBench.cpp

Issue 378413002: Revert of Slim Skia down to just one murmur3 implementation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkChecksum.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/FontCacheBench.cpp
diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp
index 697bde64f42739456eaff520cea0d38c42ad67d5..0e75c9cb174f5f8d95e416671dcf4c660991dd56 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 @@
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
« no previous file with comments | « no previous file | src/core/SkChecksum.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698