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

Unified Diff: src/ports/SkTypeface_win_dw.cpp

Issue 1953153004: SkAdvancedTypefaceMetrics: abstract out linked list (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-05-06 (Friday) 17:00:24 EDT 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 | « src/ports/SkFontHost_win.cpp ('k') | tests/WArrayTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkTypeface_win_dw.cpp
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp
index 18c63a5089250747fe7e4418f44c6319d15f463f..de599d67e5dc7cab83c56305a30b430550854ae5 100644
--- a/src/ports/SkTypeface_win_dw.cpp
+++ b/src/ports/SkTypeface_win_dw.cpp
@@ -284,8 +284,6 @@ void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const {
///////////////////////////////////////////////////////////////////////////////
//PDF Support
-using namespace skia_advanced_typeface_metrics_utils;
-
// Construct Glyph to Unicode table.
// Unicode code points that require conjugate pairs in utf16 are not
// supported.
@@ -444,19 +442,16 @@ SkAdvancedTypefaceMetrics* DWriteFontTypeface::onGetAdvancedTypefaceMetrics(
if (perGlyphInfo & kHAdvance_PerGlyphInfo) {
if (fixedWidth) {
- appendRange(&info->fGlyphWidths, 0);
+ SkAdvancedTypefaceMetrics::WidthRange range(0);
int16_t advance;
getWidthAdvance(fDWriteFontFace.get(), 1, &advance);
- info->fGlyphWidths->fAdvance.append(1, &advance);
- finishRange(info->fGlyphWidths.get(), 0,
- SkAdvancedTypefaceMetrics::WidthRange::kDefault);
+ range.fAdvance.append(1, &advance);
+ SkAdvancedTypefaceMetrics::FinishRange(
+ &range, 0, SkAdvancedTypefaceMetrics::WidthRange::kDefault);
+ info->fGlyphWidths.emplace_back(std::move(range));
} else {
- info->fGlyphWidths.reset(
- getAdvanceData(fDWriteFontFace.get(),
- glyphCount,
- glyphIDs,
- glyphIDsCount,
- getWidthAdvance));
+ info->setGlyphWidths(fDWriteFontFace.get(), glyphCount, glyphIDs,
+ glyphIDsCount, getWidthAdvance);
}
}
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | tests/WArrayTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698