summaryrefslogtreecommitdiff
path: root/device
diff options
context:
space:
mode:
authorbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-25 15:55:13 +0000
committerbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-25 15:55:13 +0000
commitd2731d5c7b86d90dfd3b2e51cc3c8db8f1c49d10 (patch)
treeda7ba4a55766f296a3734aa2dc87b7d61c00ec43 /device
parent16d9a00ff1268b557dfa4beb8317122e690aa279 (diff)
downloadsrc-d2731d5c7b86d90dfd3b2e51cc3c8db8f1c49d10.tar.gz
Always round text position correctly.
https://codereview.appspot.com/7383049/ Will require rebaseline of fontscaler GM. Must add SK_IGNORE_SUBPIXEL_AXIS_ALIGN_FIX to Chromium until ~150 layout tests can be rebaselined. git-svn-id: http://skia.googlecode.com/svn/trunk/src@7842 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'device')
-rw-r--r--device/xps/SkXPSDevice.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/device/xps/SkXPSDevice.cpp b/device/xps/SkXPSDevice.cpp
index 2f01123c..30ac3305 100644
--- a/device/xps/SkXPSDevice.cpp
+++ b/device/xps/SkXPSDevice.cpp
@@ -2182,13 +2182,8 @@ static void xps_draw_1_glyph(const SkDraw1Glyph& state,
SkXPSDrawProcs* procs = static_cast<SkXPSDrawProcs*>(state.fDraw->fProcs);
//Draw pre-adds half the sampling frequency for floor rounding.
- if (state.fCache->isSubpixel()) {
- x -= (SK_FixedHalf >> SkGlyph::kSubBits);
- y -= (SK_FixedHalf >> SkGlyph::kSubBits);
- } else {
- x -= SK_FixedHalf;
- y -= SK_FixedHalf;
- }
+ x -= state.fHalfSampleX;
+ y -= state.fHalfSampleY;
XPS_GLYPH_INDEX* xpsGlyph = procs->xpsGlyphs.append();
uint16_t glyphID = skGlyph.getGlyphID();