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);
array += count + 1; // skip the sentinel
}
}
-
+
private:
typedef SkBenchmark INHERITED;
};
h ^= h >> 13;
h *= 0xc2b2ae35;
h ^= h >> 16;
-
+
h ^= (h >> 8);
return h;
}
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;
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) {
}
}
}
-
+
private:
typedef SkBenchmark INHERITED;
};