aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-12 15:25:29 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-12 15:25:29 +0000
commit9fc5c68823c7e39e4769a41713ce070a7780df29 (patch)
tree535b70eab35005f1185b536479a8cb52495e04f6 /include
parent940ccc819b821b4e7849491df70f4597318e1fa8 (diff)
Fix leak detected in FontMgrMatchGM::onDraw by Valgrind.
git-svn-id: http://skia.googlecode.com/svn/trunk@12242 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/ports/SkFontMgr.h5
1 files changed, 5 insertions, 0 deletions
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[],