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

Unified Diff: src/core/SkAdvancedTypefaceMetrics.h

Issue 1955053002: SkAdvancedTypefaceMetrics: getAdvanceData uses std::function (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typedef Created 4 years, 7 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/SkAdvancedTypefaceMetrics.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkAdvancedTypefaceMetrics.h
diff --git a/src/core/SkAdvancedTypefaceMetrics.h b/src/core/SkAdvancedTypefaceMetrics.h
index 5e7e59331f73e44bbf65a14537fb6f5c15742e93..026aec26f46ecf111af504469ac5d708cd1856f5 100644
--- a/src/core/SkAdvancedTypefaceMetrics.h
+++ b/src/core/SkAdvancedTypefaceMetrics.h
@@ -55,14 +55,11 @@ public:
passes back advance data from the
typeface. Returns false on failure.
*/
- template <typename FontHandle>
- void setGlyphWidths(FontHandle fontHandle,
- int num_glyphs,
+ typedef std::function<bool(int glyphId, int16_t* advanceData)> GetAdvance;
+ void setGlyphWidths(int num_glyphs,
const uint32_t* subsetGlyphIDs,
uint32_t subsetGlyphIDsLength,
- bool (*getAdvance)(FontHandle fontHandle,
- int gId,
- int16_t* data));
+ GetAdvance getAdvance);
SkString fFontName;
« no previous file with comments | « no previous file | src/core/SkAdvancedTypefaceMetrics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698