Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: include/core/SkTypeface.h

Issue 21716005: Add getFamilyNames to SkTypeface. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkTypeface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypeface.h
===================================================================
--- include/core/SkTypeface.h (revision 10613)
+++ include/core/SkTypeface.h (working copy)
@@ -233,13 +233,14 @@
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 @@
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,
« no previous file with comments | « no previous file | src/core/SkTypeface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698