Index: src/gpu/GrBitmapTextContext.cpp |
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp |
index d06df1c16bcce17ee33f8462e9512b2a2aef8b6e..740c039fc9448fdde68713db8b6563374fedad71 100755 |
--- a/src/gpu/GrBitmapTextContext.cpp |
+++ b/src/gpu/GrBitmapTextContext.cpp |
@@ -265,11 +265,11 @@ void GrBitmapTextContext::onDrawPosText(GrRenderTarget* rt, const GrClip& clip, |
SkDEBUGCODE(SkFixed prevAdvY = metricGlyph.fAdvanceY;) |
SkPoint tmsLoc; |
tmsProc(pos, &tmsLoc); |
- SkIPoint fixedLoc; |
- alignProc(tmsLoc, metricGlyph, &fixedLoc); |
+ SkPoint alignLoc; |
+ alignProc(tmsLoc, metricGlyph, &alignLoc); |
- SkFixed fx = fixedLoc.fX + halfSampleX; |
- SkFixed fy = fixedLoc.fY + halfSampleY; |
+ SkFixed fx = SkScalarToFixed(alignLoc.fX) + halfSampleX; |
+ SkFixed fy = SkScalarToFixed(alignLoc.fY) + halfSampleY; |
// have to call again, now that we've been "aligned" |
const SkGlyph& glyph = glyphCacheProc(cache, ¤tText, |
@@ -320,11 +320,11 @@ void GrBitmapTextContext::onDrawPosText(GrRenderTarget* rt, const GrClip& clip, |
SkPoint tmsLoc; |
tmsProc(pos, &tmsLoc); |
- SkIPoint fixedLoc; |
- alignProc(tmsLoc, glyph, &fixedLoc); |
+ SkPoint alignLoc; |
+ alignProc(tmsLoc, glyph, &alignLoc); |
- SkFixed fx = fixedLoc.fX + SK_FixedHalf; //halfSampleX; |
- SkFixed fy = fixedLoc.fY + SK_FixedHalf; //halfSampleY; |
+ SkFixed fx = SkScalarToFixed(alignLoc.fX) + SK_FixedHalf; //halfSampleX; |
+ SkFixed fy = SkScalarToFixed(alignLoc.fY) + SK_FixedHalf; //halfSampleY; |
this->appendGlyph(GrGlyph::Pack(glyph.getGlyphID(), |
glyph.getSubXFixed(), |
glyph.getSubYFixed()), |