From bcb88e51cdd3217dc74c4888da952840a620ef54 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Tue, 20 Aug 2013 14:36:59 +0000 Subject: Revert r10788 (allow both GDI and DW fontmgrs at the same time) due to Chromium XP bot failures git-svn-id: http://skia.googlecode.com/svn/trunk@10813 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/fontmgr.cpp | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'gm/fontmgr.cpp') diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp index 9c300ab502..70b91150d0 100644 --- a/gm/fontmgr.cpp +++ b/gm/fontmgr.cpp @@ -11,11 +11,6 @@ #include "SkGraphics.h" #include "SkTypeface.h" -#ifdef SK_BUILD_FOR_WIN - extern SkFontMgr* SkFontMgr_New_GDI(); - extern SkFontMgr* SkFontMgr_New_DirectWrite(); -#endif - // limit this just so we don't take too long to draw #define MAX_FAMILIES 30 @@ -27,21 +22,13 @@ static SkScalar drawString(SkCanvas* canvas, const SkString& text, SkScalar x, class FontMgrGM : public skiagm::GM { public: - FontMgrGM(SkFontMgr* (*factory)() = NULL) { + FontMgrGM() { SkGraphics::SetFontCacheLimit(16 * 1024 * 1024); - - fName.set("fontmgr_iter"); - if (factory) { - fName.append("_factory"); - fFM.reset(factory()); - } else { - fFM.reset(SkFontMgr::RefDefault()); - } } protected: virtual SkString onShortName() { - return fName; + return SkString("fontmgr_iter"); } virtual SkISize onISize() { @@ -56,7 +43,7 @@ protected: paint.setSubpixelText(true); paint.setTextSize(17); - SkFontMgr* fm = fFM; + SkAutoTUnref fm(SkFontMgr::RefDefault()); int count = SkMin32(fm->countFamilies(), MAX_FAMILIES); for (int i = 0; i < count; ++i) { @@ -92,8 +79,6 @@ protected: } private: - SkAutoTUnref fFM; - SkString fName; typedef GM INHERITED; }; @@ -196,7 +181,3 @@ private: DEF_GM( return SkNEW(FontMgrGM); ) DEF_GM( return SkNEW(FontMgrMatchGM); ) - -#ifdef SK_BUILD_FOR_WIN - DEF_GM( return SkNEW_ARGS(FontMgrGM, (SkFontMgr_New_DirectWrite)); ) -#endif -- cgit v1.2.3