aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/FontCacheBench.cpp
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-13 07:00:51 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-13 07:00:51 +0000
commita707fd53f779843cf9354db27589bb0ef6cb1a0b (patch)
treea0d455e1f1244761e453068bfe9f682cc4c51e9a /bench/FontCacheBench.cpp
parent1d32cc67f77d3fac29db574d79c7dff93e035259 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9567 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/FontCacheBench.cpp')
-rw-r--r--bench/FontCacheBench.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp
index bfe628cbc2..c6aab7a5ba 100644
--- a/bench/FontCacheBench.cpp
+++ b/bench/FontCacheBench.cpp
@@ -30,17 +30,17 @@ class FontCacheBench : public SkBenchmark {
public:
FontCacheBench(void* param) : INHERITED(param) {}
-
+
protected:
virtual const char* onGetName() SK_OVERRIDE {
return "fontcache";
}
-
+
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkPaint paint;
this->setupPaint(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
-
+
const uint16_t* array = gUniqueGlyphIDs;
while (*array != gUniqueGlyphIDs_Sentinel) {
size_t count = count_glyphs(array);
@@ -50,7 +50,7 @@ protected:
array += count + 1; // skip the sentinel
}
}
-
+
private:
typedef SkBenchmark INHERITED;
};
@@ -74,7 +74,7 @@ static uint32_t hasher2(uint32_t h) {
h ^= h >> 13;
h *= 0xc2b2ae35;
h ^= h >> 16;
-
+
h ^= (h >> 8);
return h;
}
@@ -94,7 +94,7 @@ static int count_collisions(const uint16_t array[], int count, HasherProc proc,
unsigned hashMask) {
char table[kMaxHashCount];
sk_bzero(table, sizeof(table));
-
+
int collisions = 0;
for (int i = 0; i < count; ++i) {
int index = proc(array[i]) & hashMask;
@@ -117,12 +117,12 @@ public:
if (false) dump_array(NULL, 0);
if (false) rotr(0, 0);
}
-
+
protected:
virtual const char* onGetName() SK_OVERRIDE {
return "fontefficiency";
}
-
+
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
static bool gDone;
if (gDone) {
@@ -149,7 +149,7 @@ protected:
}
}
}
-
+
private:
typedef SkBenchmark INHERITED;
};