Index: tools/sk_tool_utils.cpp |
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp |
index 03d02de9244b236e489992f6ace0278791b76153..9ab86edf2fb16c5d253f15649fead40521d7dd78 100644 |
--- a/tools/sk_tool_utils.cpp |
+++ b/tools/sk_tool_utils.cpp |
@@ -32,14 +32,17 @@ const char* platform_os_emoji() { |
return ""; |
} |
-SkTypeface* emoji_typeface() { |
+void emoji_typeface(SkAutoTUnref<SkTypeface>* tf) { |
if (!strcmp(sk_tool_utils::platform_os_emoji(), "CBDT")) { |
- return GetResourceAsTypeface("/fonts/Funkster.ttf"); |
+ tf->reset(GetResourceAsTypeface("/fonts/Funkster.ttf")); |
+ return; |
} |
if (!strcmp(sk_tool_utils::platform_os_emoji(), "SBIX")) { |
- return SkTypeface::CreateFromName("Apple Color Emoji", SkTypeface::kNormal); |
+ tf->reset(SkTypeface::CreateFromName("Apple Color Emoji", SkTypeface::kNormal)); |
+ return; |
} |
- return NULL; |
+ tf->reset(NULL); |
+ return; |
} |
const char* emoji_sample_text() { |