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

Unified Diff: gm/coloremoji.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/coloremoji.cpp
diff --git a/gm/coloremoji.cpp b/gm/coloremoji.cpp
index b29040ac29d816ef3a9774c7b2a1bfab739937bf..ebb3c6715c70855859619f4646055234f19c31e1 100644
--- a/gm/coloremoji.cpp
+++ b/gm/coloremoji.cpp
@@ -50,11 +50,11 @@
protected:
struct EmojiFont {
- sk_sp<SkTypeface> typeface;
+ SkAutoTUnref<SkTypeface> typeface;
const char* text;
} emojiFont;
virtual void onOnceBeforeDraw() override {
- emojiFont.typeface = sk_tool_utils::emoji_typeface();
+ sk_tool_utils::emoji_typeface(&emojiFont.typeface);
emojiFont.text = sk_tool_utils::emoji_sample_text();
}
@@ -92,7 +92,7 @@
for (int makeBlur = 0; makeBlur < 2; makeBlur++) {
for (int makeGray = 0; makeGray < 2; makeGray++) {
SkPaint shaderPaint;
- shaderPaint.setTypeface(sk_ref_sp(paint.getTypeface()));
+ shaderPaint.setTypeface(paint.getTypeface());
if (SkToBool(makeLinear)) {
shaderPaint.setShader(MakeLinear());
}
« no previous file with comments | « fuzz/FilterFuzz.cpp ('k') | gm/colortype.cpp » ('j') | src/ports/SkFontMgr_android.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698