Change type of SkGlyph::fAdvance[XY] to float.
BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737693006
Review URL: https://codereview.chromium.org/1737693006
diff --git a/src/core/SkDrawProcs.h b/src/core/SkDrawProcs.h
index a861a0a..15c5cf8 100644
--- a/src/core/SkDrawProcs.h
+++ b/src/core/SkDrawProcs.h
@@ -51,12 +51,12 @@
if (SkPaint::kLeft_Align == fAlign) {
dst->set(loc.fX, loc.fY);
} else if (SkPaint::kCenter_Align == fAlign) {
- dst->set(loc.fX - SkFixedToScalar(glyph.fAdvanceX >> 1),
- loc.fY - SkFixedToScalar(glyph.fAdvanceY >> 1));
+ dst->set(loc.fX - SkFloatToScalar(glyph.fAdvanceX) / 2,
+ loc.fY - SkFloatToScalar(glyph.fAdvanceY) / 2);
} else {
SkASSERT(SkPaint::kRight_Align == fAlign);
- dst->set(loc.fX - SkFixedToScalar(glyph.fAdvanceX),
- loc.fY - SkFixedToScalar(glyph.fAdvanceY));
+ dst->set(loc.fX - SkFloatToScalar(glyph.fAdvanceX),
+ loc.fY - SkFloatToScalar(glyph.fAdvanceY));
}
}
private: