| Index: src/gpu/GrDistanceFieldTextContext.cpp
|
| diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
|
| index a6cb285a707b043609329aadf93f521d87609109..8d993fa2039e116f4cca56ed9fd55e67131af6e4 100755
|
| --- a/src/gpu/GrDistanceFieldTextContext.cpp
|
| +++ b/src/gpu/GrDistanceFieldTextContext.cpp
|
| @@ -535,6 +535,8 @@ bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
|
| if (NULL == glyph->fPlot) {
|
| // needs to be a separate conditional to avoid over-optimization
|
| // on Nexus 7 and Nexus 10
|
| +
|
| + // If the glyph is too large we fall back to paths
|
| if (!uploadGlyph(glyph, scaler)) {
|
| if (NULL == glyph->fPath) {
|
| SkPath* path = SkNEW(SkPath);
|
| @@ -552,13 +554,12 @@ bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed,
|
| SkMatrix ctm;
|
| ctm.setScale(fTextRatio, fTextRatio);
|
| ctm.postTranslate(sx - dx, sy - dy);
|
| - GrPaint tmpPaint(fPaint);
|
| - tmpPaint.localCoordChange(ctm);
|
|
|
| - SkMatrix viewM = fViewMatrix;
|
| - viewM.preConcat(ctm);
|
| + SkPath tmpPath(*glyph->fPath);
|
| + tmpPath.transform(ctm);
|
| +
|
| GrStrokeInfo strokeInfo(SkStrokeRec::kFill_InitStyle);
|
| - fContext->drawPath(tmpPaint, viewM, *glyph->fPath, strokeInfo);
|
| + fContext->drawPath(fPaint, fViewMatrix, tmpPath, strokeInfo);
|
|
|
| // remove this glyph from the vertices we need to allocate
|
| fTotalVertexCount -= kVerticesPerGlyph;
|
|
|