Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: bench/SkGlyphCacheBench.cpp

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Android fix + nit fix Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bench/TextBlobBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkGlyphCacheBench.cpp
diff --git a/bench/SkGlyphCacheBench.cpp b/bench/SkGlyphCacheBench.cpp
index c5e40af746949328a7fa14e945084d8101ce2a40..4d43a611d48c8003b8ea607986ae6022406b3020 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) {
« no previous file with comments | « no previous file | bench/TextBlobBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698