Chromium Code Reviews| Index: src/ports/SkFontHost_FreeType.cpp |
| diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp |
| index b53364eacb47eab195b7b6cc7269143736a62e3b..b1ab31d79913e669baadb9e1d34b62d7227d1fa7 100644 |
| --- a/src/ports/SkFontHost_FreeType.cpp |
| +++ b/src/ports/SkFontHost_FreeType.cpp |
| @@ -614,12 +614,15 @@ SkAdvancedTypefaceMetrics* SkTypeface_FreeType::onGetAdvancedTypefaceMetrics( |
| finishRange(info->fGlyphWidths.get(), face->num_glyphs - 1, |
| SkAdvancedTypefaceMetrics::WidthRange::kRange); |
| } else { |
| + std::function<bool(int gId, int16_t* data)> getWidthAdvanceFn = |
|
herb_g
2016/05/06 15:54:16
Use auto instead of std::function...
Here and othe
tomhudson
2016/05/06 15:58:02
Nit: with auto, the return value is totally implic
hal.canary
2016/05/06 16:00:56
Done.
|
| + [face](int gId, int16_t* data) { |
| + return getWidthAdvance(face, gId, data); |
| + }; |
| info->fGlyphWidths.reset( |
| - getAdvanceData(face, |
| - face->num_glyphs, |
| + getAdvanceData(face->num_glyphs, |
| glyphIDs, |
| glyphIDsCount, |
| - &getWidthAdvance)); |
| + getWidthAdvanceFn)); |
| } |
| } |