diff options
Diffstat (limited to 'bench')
-rw-r--r-- | bench/SkGlyphCacheBench.cpp | 9 | ||||
-rw-r--r-- | bench/TextBlobBench.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/bench/SkGlyphCacheBench.cpp b/bench/SkGlyphCacheBench.cpp index c5e40af746..4d43a611d4 100644 --- a/bench/SkGlyphCacheBench.cpp +++ b/bench/SkGlyphCacheBench.cpp @@ -56,7 +56,8 @@ protected: SkPaint paint; paint.setAntiAlias(true); paint.setSubpixelText(true); - paint.setTypeface(sk_tool_utils::create_portable_typeface("serif", SkTypeface::kItalic)); + paint.setTypeface(sk_tool_utils::create_portable_typeface( + "serif", SkFontStyle::FromOldStyle(SkTypeface::kItalic))); for (int work = 0; work < loops; work++) { do_font_stuff(&paint); @@ -88,8 +89,10 @@ protected: size_t oldCacheLimitSize = SkGraphics::GetFontCacheLimit(); SkGraphics::SetFontCacheLimit(fCacheSize); sk_sp<SkTypeface> typefaces[] = - {sk_tool_utils::create_portable_typeface("serif", SkTypeface::kItalic), - sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kItalic)}; + {sk_tool_utils::create_portable_typeface("serif", + SkFontStyle::FromOldStyle(SkTypeface::kItalic)), + sk_tool_utils::create_portable_typeface("sans-serif", + SkFontStyle::FromOldStyle(SkTypeface::kItalic))}; for (int work = 0; work < loops; work++) { SkTaskGroup().batch(16, [&](int threadIndex) { diff --git a/bench/TextBlobBench.cpp b/bench/TextBlobBench.cpp index 37bf311119..7c9b303430 100644 --- a/bench/TextBlobBench.cpp +++ b/bench/TextBlobBench.cpp @@ -27,7 +27,7 @@ public: protected: void onDelayedSetup() override { - fTypeface = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal); + fTypeface = sk_tool_utils::create_portable_typeface("serif", SkFontStyle()); // make textblob SkPaint paint; paint.setTypeface(fTypeface); |