Chromium Code Reviews| Index: src/core/SkDrawProcs.h |
| diff --git a/src/core/SkDrawProcs.h b/src/core/SkDrawProcs.h |
| index d059c674701fe146ef9076c6068e42be1816c86e..0a188235d2dbc165f10737f7d2498f11ded3cd48 100644 |
| --- a/src/core/SkDrawProcs.h |
| +++ b/src/core/SkDrawProcs.h |
| @@ -24,9 +24,9 @@ struct SkDraw1Glyph { |
| const SkPaint* fPaint; |
| SkIRect fClipBounds; |
| /** Half the sampling frequency of the rasterized glyph in x. */ |
| - SkFixed fHalfSampleX; |
| + SkScalar fHalfSampleX; |
| /** Half the sampling frequency of the rasterized glyph in y. */ |
| - SkFixed fHalfSampleY; |
| + SkScalar fHalfSampleY; |
| /** Draws one glyph. |
| * |
| @@ -35,7 +35,7 @@ struct SkDraw1Glyph { |
| * e.g. 1/2 or 1/(2^(SkGlyph::kSubBits+1)) has already been added. |
| * This added bias can be found in fHalfSampleX,Y. |
| */ |
| - typedef void (*Proc)(const SkDraw1Glyph&, SkFixed x, SkFixed y, const SkGlyph&); |
| + typedef void (*Proc)(const SkDraw1Glyph&, Sk48Dot16 x, Sk48Dot16 y, const SkGlyph&); |
| Proc init(const SkDraw* draw, SkBlitter* blitter, SkGlyphCache* cache, |
| const SkPaint&); |
| @@ -93,31 +93,6 @@ public: |
| : fAlign(align) { |
| } |
| - // Returns the position of the glyph in fixed point, which may be rounded or not |
|
bungeman-skia
2015/03/05 20:46:46
Removing all of this does mean there is one extra
|
| - // by the caller e.g. subpixel doesn't round. |
| - // @param point interpreted as SkFixed [x, y]. |
| - void operator()(const SkPoint& loc, const SkGlyph& glyph, SkIPoint* dst) { |
| - if (SkPaint::kLeft_Align == fAlign) { |
| - dst->set(SkScalarToFixed(loc.fX), SkScalarToFixed(loc.fY)); |
| - } else if (SkPaint::kCenter_Align == fAlign) { |
| - dst->set(SkScalarToFixed(loc.fX) - (glyph.fAdvanceX >> 1), |
| - SkScalarToFixed(loc.fY) - (glyph.fAdvanceY >> 1)); |
| - } else { |
| - SkASSERT(SkPaint::kRight_Align == fAlign); |
| - dst->set(SkScalarToFixed(loc.fX) - glyph.fAdvanceX, |
| - SkScalarToFixed(loc.fY) - glyph.fAdvanceY); |
| - } |
| - } |
| -private: |
| - const SkPaint::Align fAlign; |
| -}; |
| - |
| -class SkTextAlignProcScalar { |
| -public: |
| - SkTextAlignProcScalar(SkPaint::Align align) |
| - : fAlign(align) { |
| - } |
| - |
| // Returns the glyph position, which may be rounded or not by the caller |
| // e.g. subpixel doesn't round. |
| void operator()(const SkPoint& loc, const SkGlyph& glyph, SkPoint* dst) { |