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

Unified Diff: src/ports/SkFontConfigTypeface.h

Issue 2346333002: Split SkFontConfigInterface globals and factory. (Closed)
Patch Set: Created 4 years, 3 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: src/ports/SkFontConfigTypeface.h
diff --git a/src/ports/SkFontConfigTypeface.h b/src/ports/SkFontConfigTypeface.h
index 1a59d7c1ed303f3ed0be2f495f0f88cfda434fee..0da78aed87bc0ad973b713f4a5ac706893fc0546 100644
--- a/src/ports/SkFontConfigTypeface.h
+++ b/src/ports/SkFontConfigTypeface.h
@@ -20,12 +20,12 @@ class SkTypeface_FCI : public SkTypeface_FreeType {
std::unique_ptr<SkFontData> fFontData;
public:
- static SkTypeface_FCI* Create(SkFontConfigInterface* fci,
+ static SkTypeface_FCI* Create(sk_sp<SkFontConfigInterface> fci,
const SkFontConfigInterface::FontIdentity& fi,
const SkString& familyName,
const SkFontStyle& style)
{
- return new SkTypeface_FCI(fci, fi, familyName, style);
+ return new SkTypeface_FCI(std::move(fci), fi, familyName, style);
}
static SkTypeface_FCI* Create(std::unique_ptr<SkFontData> data,
@@ -39,12 +39,12 @@ public:
}
protected:
- SkTypeface_FCI(SkFontConfigInterface* fci,
+ SkTypeface_FCI(sk_sp<SkFontConfigInterface> fci,
const SkFontConfigInterface::FontIdentity& fi,
const SkString& familyName,
const SkFontStyle& style)
: INHERITED(style, false)
- , fFCI(SkRef(fci))
+ , fFCI(std::move(fci))
, fIdentity(fi)
, fFamilyName(familyName)
, fFontData(nullptr) {}

Powered by Google App Engine
This is Rietveld 408576698