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

Unified Diff: bench/TextBench.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: bench/TextBench.cpp
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index a048ffd4a12ff2265f3a1e75d9ab59fd88dfe996..04f824c700c055106de209b2f8e6e630edd1a724 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -47,7 +47,7 @@
FontQuality fFQ;
bool fDoPos;
bool fDoColorEmoji;
- sk_sp<SkTypeface> fColorEmojiTypeface;
+ SkAutoTUnref<SkTypeface> fColorEmojiTypeface;
SkPoint* fPos;
public:
TextBench(const char text[], int ps,
@@ -71,7 +71,7 @@
void onDelayedSetup() override {
if (fDoColorEmoji) {
SkASSERT(kBW == fFQ);
- fColorEmojiTypeface = MakeResourceAsTypeface("/fonts/Funkster.ttf");
+ fColorEmojiTypeface.reset(GetResourceAsTypeface("/fonts/Funkster.ttf"));
}
if (fDoPos) {

Powered by Google App Engine
This is Rietveld 408576698