38 for (
int i = 0; i < r.fLoops; ++i) {
48 for (
int i = 0; i < r.fLoops; ++i) {
54 for (
int loop = 0; loop < r.fLoops; ++loop) {
56 for (
int i = 0; i < r.fCount; ++i) {
57 cache.addCharAndGlyph(r.fText[i], i);
63 for (
int loop = 0; loop < r.fLoops; ++loop) {
64 for (
int i = 0; i < r.fCount; ++i) {
65 r.fCache.findGlyphIndex(r.fText[i]);
87 for (
int i = 0; i <
count; ++i) {
88 fText[i] = rand.
nextU() & 0xFFFF;
100 return fName.c_str();
104 fProc({fCache, loops, fFont, fText, fCount});
static void charsToGlyphs_proc(const Rec &r)
static void addcache_proc(const Rec &r)
void(* TypefaceProc)(const Rec &r)
static void textToGlyphs_proc(const Rec &r)
static void findcache_proc(const Rec &r)
@ kUTF32
uses four byte words to represent all of Unicode
bool isSuitableFor(Backend backend) override
void onDraw(int loops, SkCanvas *canvas) override
CMAPBench(TypefaceProc proc, const char name[], int count)
const char * onGetName() override
void addCharAndGlyph(SkUnichar unichar, SkGlyphID glyph)
void setTypeface(sk_sp< SkTypeface > tf)
void unicharsToGlyphs(const SkUnichar uni[], int count, SkGlyphID glyphs[]) const