6#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && !defined(SK_BUILD_FOR_GOOGLE3)
16 ShaperBench(
const char* r,
const char* n) : fResource(r),
fName(n) {}
17 std::unique_ptr<SkShaper> fShaper;
19 const char* fResource;
28 if (!fData || !fShaper) {
return; }
30 const char*
text = (
const char*)fData->
data();
34 fShaper->shape(
text,
len,
font,
true, FLT_MAX, &rh);
41#define SHAPER_BENCH(X) DEF_BENCH(return new ShaperBench("text/" #X ".txt", "shaper_" #X);)
sk_sp< SkData > GetResourceAsData(const char *resource)
virtual void onDraw(int loops, SkCanvas *)=0
virtual bool isSuitableFor(Backend backend)
virtual void onDelayedSetup()
virtual const char * onGetName()=0
const void * data() const
static std::unique_ptr< SkShaper > Make(sk_sp< SkFontMgr > fallback=nullptr)
font
Font Metadata and Metrics.