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

Unified Diff: src/core/SkDrawProcs.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/SkAutoKern.h ('k') | src/core/SkFDot6.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDrawProcs.h
diff --git a/src/core/SkDrawProcs.h b/src/core/SkDrawProcs.h
index a861a0ad86688fc6b357e4862cc5a8fe4f7a5c22..15c5cf866a537c47ef37e4644057faa808292139 100644
--- a/src/core/SkDrawProcs.h
+++ b/src/core/SkDrawProcs.h
@@ -51,12 +51,12 @@ public:
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:
« no previous file with comments | « src/core/SkAutoKern.h ('k') | src/core/SkFDot6.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698