Cleanup conversion that the new NDK compiler tries to over optimize.
This allows us to upgrade to NDK r10c as the dftext gm no longer fails
when compiled with -O2.
Review URL: https://codereview.chromium.org/690053002
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 155f636..5e23ba0 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -316,9 +316,7 @@
if (!this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(),
glyph.getSubXFixed(),
glyph.getSubYFixed()),
- SkScalarToFixed(x),
- SkScalarToFixed(y),
- fontScaler)) {
+ x, y, fontScaler)) {
// couldn't append, send to fallback
fallbackTxt.push_back_n(text-lastText, lastText);
fallbackPos.push_back(pos[0]);
@@ -347,9 +345,7 @@
if (!this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(),
glyph.getSubXFixed(),
glyph.getSubYFixed()),
- SkScalarToFixed(x - advanceX),
- SkScalarToFixed(y - advanceY),
- fontScaler)) {
+ x - advanceX, y - advanceY, fontScaler)) {
// couldn't append, send to fallback
fallbackTxt.push_back_n(text-lastText, lastText);
fallbackPos.push_back(pos[0]);
@@ -452,7 +448,7 @@
// Returns true if this method handled the glyph, false if needs to be passed to fallback
//
bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
- SkFixed vx, SkFixed vy,
+ SkScalar sx, SkScalar sy,
GrFontScaler* scaler) {
if (NULL == fDrawTarget) {
return true;
@@ -472,8 +468,6 @@
return false;
}
- SkScalar sx = SkFixedToScalar(vx);
- SkScalar sy = SkFixedToScalar(vy);
/*
// not valid, need to find a different solution for this
vx += SkIntToFixed(glyph->fBounds.fLeft);