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

Unified Diff: gm/coloremoji.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. 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 | « fuzz/FilterFuzz.cpp ('k') | gm/colortype.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/coloremoji.cpp
diff --git a/gm/coloremoji.cpp b/gm/coloremoji.cpp
index ebb3c6715c70855859619f4646055234f19c31e1..b29040ac29d816ef3a9774c7b2a1bfab739937bf 100644
--- a/gm/coloremoji.cpp
+++ b/gm/coloremoji.cpp
@@ -50,11 +50,11 @@ public:
protected:
struct EmojiFont {
- SkAutoTUnref<SkTypeface> typeface;
+ sk_sp<SkTypeface> typeface;
const char* text;
} emojiFont;
virtual void onOnceBeforeDraw() override {
- sk_tool_utils::emoji_typeface(&emojiFont.typeface);
+ emojiFont.typeface = sk_tool_utils::emoji_typeface();
emojiFont.text = sk_tool_utils::emoji_sample_text();
}
@@ -92,7 +92,7 @@ protected:
for (int makeBlur = 0; makeBlur < 2; makeBlur++) {
for (int makeGray = 0; makeGray < 2; makeGray++) {
SkPaint shaderPaint;
- shaderPaint.setTypeface(paint.getTypeface());
+ shaderPaint.setTypeface(sk_ref_sp(paint.getTypeface()));
if (SkToBool(makeLinear)) {
shaderPaint.setShader(MakeLinear());
}
« no previous file with comments | « fuzz/FilterFuzz.cpp ('k') | gm/colortype.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698