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

Unified Diff: src/core/SkTextToPathIter.h

Issue 1737693006: Change type of SkGlyph::fAdvance[XY] to float. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Should be float, not SkScalar. Created 4 years, 9 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
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/fonts/SkGScalerContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTextToPathIter.h
diff --git a/src/core/SkTextToPathIter.h b/src/core/SkTextToPathIter.h
index 435c1c79f0e5a56d65c4855668c7552425f0f7a3..dcd5a01cd3caf764e4667fbeb50150b094a58a70 100644
--- a/src/core/SkTextToPathIter.h
+++ b/src/core/SkTextToPathIter.h
@@ -22,7 +22,7 @@ protected:
SkGlyphCache* fCache;
SkPaint fPaint;
SkScalar fScale;
- SkFixed fPrevAdvance;
+ SkScalar fPrevAdvance;
const char* fText;
const char* fStop;
SkPaint::GlyphCacheProc fGlyphCacheProc;
@@ -75,7 +75,7 @@ public:
&& fPaint.getTextAlign() != SkPaint::kLeft_Align) { // need to measure first
const char* text = fText;
const SkGlyph& glyph = fGlyphCacheProc(fCache, &text);
- SkScalar width = SkScalarMul(SkFixedToScalar((&glyph.fAdvanceX)[0]), fScale);
+ SkScalar width = SkScalarMul(SkFloatToScalar((&glyph.fAdvanceX)[0]), fScale);
if (fPaint.getTextAlign() == SkPaint::kCenter_Align) {
width = SkScalarHalf(width);
}
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/fonts/SkGScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698