Remove use of SkFixed. Update code to use SkGlyph.fAdvance[XY] after https://codereview.chromium.org/1737693006.
(cherry picked from commit 6db72075318e030562a1b61e47f125e91c1fb945)
Change-Id: Ib8bdf9df3efab39c7e7681cee3075e223a948b2d
diff --git a/libs/hwui/font/Font.cpp b/libs/hwui/font/Font.cpp
index 8e04c87..9c812bc 100644
--- a/libs/hwui/font/Font.cpp
+++ b/libs/hwui/font/Font.cpp
@@ -304,7 +304,7 @@
}
int glyphsCount = 0;
- SkFixed prevRsbDelta = 0;
+ int prevRsbDelta = 0;
float penX = 0.0f;
@@ -332,14 +332,14 @@
}
CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph);
- penX += SkFixedToFloat(AUTO_KERN(prevRsbDelta, cachedGlyph->mLsbDelta));
+ penX += AUTO_KERN(prevRsbDelta, cachedGlyph->mLsbDelta);
prevRsbDelta = cachedGlyph->mRsbDelta;
if (cachedGlyph->mIsValid && cachedGlyph->mCacheTexture) {
drawCachedGlyph(cachedGlyph, penX, hOffset, vOffset, measure, &position, &tangent);
}
- penX += SkFixedToFloat(cachedGlyph->mAdvanceX);
+ penX += cachedGlyph->mAdvanceX;
glyphsCount++;
}