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

Unified Diff: gm/textblobmixedsizes.cpp

Issue 1974783002: Revert of Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: gm/textblobmixedsizes.cpp
diff --git a/gm/textblobmixedsizes.cpp b/gm/textblobmixedsizes.cpp
index 8f5dc85e48226187401f2fb82dd4e6a5312f82a4..9e57c2fe975245d56b7563d02757da0079ed45bd 100644
--- a/gm/textblobmixedsizes.cpp
+++ b/gm/textblobmixedsizes.cpp
@@ -27,6 +27,7 @@
protected:
void onOnceBeforeDraw() override {
+ SkAutoTUnref<SkTypeface> typeface(GetResourceAsTypeface("/fonts/HangingS.ttf"));
SkTextBlobBuilder builder;
// make textblob. To stress distance fields, we choose sizes appropriately
@@ -34,7 +35,7 @@
paint.setAntiAlias(true);
paint.setSubpixelText(true);
paint.setLCDRenderText(true);
- paint.setTypeface(MakeResourceAsTypeface("/fonts/HangingS.ttf"));
+ paint.setTypeface(typeface);
const char* text = "Skia";
« no previous file with comments | « gm/textblob.cpp ('k') | gm/textblobrandomfont.cpp » ('j') | src/ports/SkFontMgr_android.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698