diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-13 15:02:58 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-13 15:02:58 +0000 |
commit | 2211b623274e24d0025763cfa855c9eb53d5b900 (patch) | |
tree | 577c76b39b81a974158a8abd4449e52e15736d49 /src/core/SkDrawProcs.h | |
parent | ce7adb580ee7cc608e1049732b1ebb3f0533df4a (diff) |
Subpixel text 3/8 of a pixel too far to the right.
http://codereview.appspot.com/5502097/
git-svn-id: http://skia.googlecode.com/svn/trunk@3037 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDrawProcs.h')
-rw-r--r-- | src/core/SkDrawProcs.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/core/SkDrawProcs.h b/src/core/SkDrawProcs.h index 74aa9bb01a..33b870d2c8 100644 --- a/src/core/SkDrawProcs.h +++ b/src/core/SkDrawProcs.h @@ -14,19 +14,20 @@ class SkAAClip; class SkBlitter; struct SkDraw1Glyph { - const SkDraw* fDraw; - SkBounder* fBounder; - const SkRegion* fClip; - const SkAAClip* fAAClip; - SkBlitter* fBlitter; - SkGlyphCache* fCache; - SkIRect fClipBounds; - - // The fixed x,y have been pre-rounded (i.e. 1/2 has already been added), - // so the impls need just trunc down to an int - typedef void (*Proc)(const SkDraw1Glyph&, SkFixed x, SkFixed y, const SkGlyph&); - - Proc init(const SkDraw* draw, SkBlitter* blitter, SkGlyphCache* cache); + const SkDraw* fDraw; + SkBounder* fBounder; + const SkRegion* fClip; + const SkAAClip* fAAClip; + SkBlitter* fBlitter; + SkGlyphCache* fCache; + SkIRect fClipBounds; + + // The fixed x,y are pre-rounded, so impls just trunc them down to ints. + // i.e. half the sampling frequency has been added. + // e.g. 1/2 or 1/(2^(SkGlyph::kSubBits+1)) has already been added. + typedef void (*Proc)(const SkDraw1Glyph&, SkFixed x, SkFixed y, const SkGlyph&); + + Proc init(const SkDraw* draw, SkBlitter* blitter, SkGlyphCache* cache); }; struct SkDrawProcs { |