Chromium Code Reviews| Index: src/core/SkDraw.cpp |
| diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
| index aa91df3df557bfc83d2cb5539933400491ac2c3d..6d82f86df759b358198fd6c49b0c31f24a5e0126 100644 |
| --- a/src/core/SkDraw.cpp |
| +++ b/src/core/SkDraw.cpp |
| @@ -2003,6 +2003,8 @@ void SkDraw::drawPosText(const char text[], size_t byteLength, |
| SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); |
| #if SK_DISTANCEFIELD_FONTS |
| const SkMatrix* ctm = fMatrix; |
|
bsalomon
2013/11/20 22:18:06
Would it be simpler to turn this into:
const SkMa
jvanverth1
2013/11/21 14:25:40
My plan is to rip out all of the distance field co
|
| + SkMatrix identity; |
| + identity.setIdentity(); |
|
bsalomon
2013/11/20 22:18:06
setIdentity() should probably be marked deprecated
jvanverth1
2013/11/21 14:25:40
Done.
|
| const SkPaint* paintRef = &paint; |
| SkPaint paintCopy; |
| uint32_t procFlags = fProcs ? fProcs->fFlags : 0; |
| @@ -2012,7 +2014,7 @@ void SkDraw::drawPosText(const char text[], size_t byteLength, |
| paintRef = &paintCopy; |
| } |
| if (procFlags & SkDrawProcs::kSkipBakedGlyphTransform_Flag) { |
| - ctm = NULL; |
| + ctm = &identity; |
| } |
| SkAutoGlyphCache autoCache(*paintRef, &fDevice->fLeakyProperties, ctm); |
| #else |
| @@ -2036,7 +2038,11 @@ void SkDraw::drawPosText(const char text[], size_t byteLength, |
| AlignProc alignProc = pick_align_proc(paint.getTextAlign()); |
| SkDraw1Glyph d1g; |
| SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache, paint); |
| +#if SK_DISTANCEFIELD_FONTS |
| + TextMapState tms(*ctm, constY); |
| +#else |
| TextMapState tms(*fMatrix, constY); |
| +#endif |
| TextMapState::Proc tmsProc = tms.pickProc(scalarsPerPosition); |
| if (cache->isSubpixel()) { |