From 3a3bdfe14746073e2f89c95879adc3bb919c0afa Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Wed, 7 Aug 2013 17:09:22 +0000 Subject: Add getFamilyNames to SkTypeface. Committed: https://code.google.com/p/skia/source/detail?r=10589 Committed: https://code.google.com/p/skia/source/detail?r=10592 Committed: https://code.google.com/p/skia/source/detail?r=10608 Review URL: https://codereview.chromium.org/21716005 git-svn-id: http://skia.googlecode.com/svn/trunk/include@10615 2bbb7eff-a529-9590-31e7-b0007b416f81 --- core/SkTypeface.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/SkTypeface.h b/core/SkTypeface.h index a2bef4b..ca88a1b 100644 --- a/core/SkTypeface.h +++ b/core/SkTypeface.h @@ -233,13 +233,14 @@ public: public: virtual ~LocalizedStrings() { } virtual bool next(LocalizedString* localizedString) = 0; + void unref() { SkDELETE(this); } }; /** * Returns an iterator which will attempt to enumerate all of the * family names specified by the font. - * It is the caller's responsibility to SK_DELETE the returned pointer. + * It is the caller's responsibility to unref() the returned pointer. */ - LocalizedStrings* getFamilyNames() const; + LocalizedStrings* createFamilyNameIterator() const; /** * Return the family name for this typeface. It will always be returned @@ -311,7 +312,7 @@ protected: virtual int onGetUPEM() const = 0; - virtual LocalizedStrings* onGetFamilyNames() const = 0; + virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0; virtual int onGetTableTags(SkFontTableTag tags[]) const = 0; virtual size_t onGetTableData(SkFontTableTag, size_t offset, -- cgit v1.2.3