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

Unified Diff: src/fonts/SkTestScalerContext.cpp

Issue 939123002: Make fID and MixedID calculations private (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Support android build Created 5 years, 10 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
Index: src/fonts/SkTestScalerContext.cpp
diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp
index b9aa6c7de6203e7d6383f159b37e92a01d97a7ea..fc1f9456e25dd4c5a5513a39988e60644f99d961 100644
--- a/src/fonts/SkTestScalerContext.cpp
+++ b/src/fonts/SkTestScalerContext.cpp
@@ -117,7 +117,7 @@ SkTestTypeface::SkTestTypeface(SkTestFont* testFont, const SkFontStyle& style)
}
void SkTestTypeface::getAdvance(SkGlyph* glyph) {
- glyph->fAdvanceX = fTestFont->fWidths[SkGlyph::ID2Code(glyph->fID)];
+ glyph->fAdvanceX = fTestFont->fWidths[glyph->getGlyphID()];
glyph->fAdvanceY = 0;
}
@@ -126,12 +126,12 @@ void SkTestTypeface::getFontMetrics(SkPaint::FontMetrics* metrics) {
}
void SkTestTypeface::getMetrics(SkGlyph* glyph) {
- glyph->fAdvanceX = fTestFont->fWidths[SkGlyph::ID2Code(glyph->fID)];
+ glyph->fAdvanceX = fTestFont->fWidths[glyph->getGlyphID()];
glyph->fAdvanceY = 0;
}
void SkTestTypeface::getPath(const SkGlyph& glyph, SkPath* path) {
- *path = *fTestFont->fPaths[SkGlyph::ID2Code(glyph.fID)];
+ *path = *fTestFont->fPaths[glyph.getGlyphID()];
}
void SkTestTypeface::onFilterRec(SkScalerContextRec* rec) const {

Powered by Google App Engine
This is Rietveld 408576698