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); |
} |