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

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 1189753007: Move FontConfig factory into separate file. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add to ignored header list. Created 5 years, 6 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 | « include/ports/SkFontMgr_fontconfig.h ('k') | src/ports/SkFontMgr_fontconfig_factory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index 3baec41cb541d0a0a5b2a40f9423f35431cd14e3..c3cb26751ee3c8252c83e524ff5273790ef2a416 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -590,13 +590,9 @@ class SkFontMgr_fontconfig : public SkFontMgr {
}
public:
- SkFontMgr_fontconfig()
- : fFC(FcInitLoadConfigAndFonts())
- , fFamilyNames(GetFamilyNames(fFC)) { }
-
/** Takes control of the reference to 'config'. */
explicit SkFontMgr_fontconfig(FcConfig* config)
- : fFC(config)
+ : fFC(config ? config : FcInitLoadConfigAndFonts())
, fFamilyNames(GetFamilyNames(fFC)) { }
virtual ~SkFontMgr_fontconfig() {
@@ -873,6 +869,6 @@ protected:
}
};
-SkFontMgr* SkFontMgr::Factory() {
- return SkNEW(SkFontMgr_fontconfig);
+SK_API SkFontMgr* SkFontMgr_New_FontConfig(FcConfig* fc) {
+ return new SkFontMgr_fontconfig(fc);
}
« no previous file with comments | « include/ports/SkFontMgr_fontconfig.h ('k') | src/ports/SkFontMgr_fontconfig_factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698