| Index: src/core/SkAutoKern.h
|
| diff --git a/src/core/SkAutoKern.h b/src/core/SkAutoKern.h
|
| index 0b22e56413eba57acf0f26b964fedda1ff358526..27df6da22bb3a08f5cc1d9dabce1de5d4f72e7ab 100644
|
| --- a/src/core/SkAutoKern.h
|
| +++ b/src/core/SkAutoKern.h
|
| @@ -12,11 +12,10 @@
|
|
|
| #include "SkGlyph.h"
|
|
|
| -#define SkAutoKern_AdjustF(prev, next) (((next) - (prev) + 32) >> 6 << 16)
|
| -#define SkAutoKern_AdjustS(prev, next) SkIntToScalar(((next) - (prev) + 32) >> 6)
|
| +#define SkAutoKern_Adjust(prev, next) SkIntToScalar(((next) - (prev) + 32) >> 6)
|
|
|
| /* this is a helper class to perform auto-kerning
|
| - * the adjust() method returns a SkFixed corresponding
|
| + * the adjust() method returns a SkScalar corresponding
|
| * to a +1/0/-1 pixel adjustment
|
| */
|
|
|
| @@ -24,7 +23,7 @@ class SkAutoKern {
|
| public:
|
| SkAutoKern() : fPrevRsbDelta(0) {}
|
|
|
| - SkFixed adjust(const SkGlyph& glyph)
|
| + SkScalar adjust(const SkGlyph& glyph)
|
| {
|
| // if (SkAbs32(glyph.fLsbDelta) > 47 || SkAbs32(glyph.fRsbDelta) > 47)
|
| // printf("------- %d> L %d R %d\n", glyph.f_GlyphID, glyph.fLsbDelta, glyph.fRsbDelta);
|
| @@ -35,13 +34,13 @@ public:
|
| fPrevRsbDelta = glyph.fRsbDelta;
|
|
|
| if (distort >= 32)
|
| - return -SK_Fixed1;
|
| + return -SK_Scalar1;
|
| else if (distort < -32)
|
| - return +SK_Fixed1;
|
| + return +SK_Scalar1;
|
| else
|
| return 0;
|
| #else
|
| - SkFixed adjust = SkAutoKern_AdjustF(fPrevRsbDelta, glyph.fLsbDelta);
|
| + SkScalar adjust = SkAutoKern_Adjust(fPrevRsbDelta, glyph.fLsbDelta);
|
| fPrevRsbDelta = glyph.fRsbDelta;
|
| return adjust;
|
| #endif
|
|
|