From 9fc5c68823c7e39e4769a41713ce070a7780df29 Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Tue, 12 Nov 2013 15:25:29 +0000 Subject: Fix leak detected in FontMgrMatchGM::onDraw by Valgrind. git-svn-id: http://skia.googlecode.com/svn/trunk@12242 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/ports/SkFontMgr.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h index 6e9f56f545..accb0c5860 100644 --- a/include/ports/SkFontMgr.h +++ b/include/ports/SkFontMgr.h @@ -41,6 +41,10 @@ public: void getFamilyName(int index, SkString* familyName); SkFontStyleSet* createStyleSet(int index); + /** + * The caller must call unref() on the returned object. + * Never returns NULL; will return an empty set if the name is not found. + */ SkFontStyleSet* matchFamily(const char familyName[]); /** @@ -89,6 +93,7 @@ protected: virtual void onGetFamilyName(int index, SkString* familyName) = 0; virtual SkFontStyleSet* onCreateStyleSet(int index) = 0; + /** May return NULL if the name is not found. */ virtual SkFontStyleSet* onMatchFamily(const char familyName[]) = 0; virtual SkTypeface* onMatchFamilyStyle(const char familyName[], -- cgit v1.2.3