Index: src/gpu/GrAtlasTextContext.cpp |
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp |
index 9b863f806c4da5b12cda6a6925c01763fe7d6388..11866b3b8a56dcc52d12b3dfb27d6b4cbeb0fc03 100644 |
--- a/src/gpu/GrAtlasTextContext.cpp |
+++ b/src/gpu/GrAtlasTextContext.cpp |
@@ -2147,13 +2147,24 @@ inline void GrAtlasTextContext::flushBigGlyphs(BitmapTextBlob* cacheBlob, GrRend |
const SkPaint& skPaint, |
SkScalar transX, SkScalar transY, |
const SkIRect& clipBounds) { |
+ if (!cacheBlob->fBigGlyphs.count()) { |
+ return; |
+ } |
+ |
+ SkMatrix pathMatrix; |
+ if (!cacheBlob->fViewMatrix.invert(&pathMatrix)) { |
+ SkDebugf("could not invert viewmatrix\n"); |
+ return; |
+ } |
+ |
for (int i = 0; i < cacheBlob->fBigGlyphs.count(); i++) { |
BitmapTextBlob::BigGlyph& bigGlyph = cacheBlob->fBigGlyphs[i]; |
bigGlyph.fVx += transX; |
bigGlyph.fVy += transY; |
- SkMatrix translate; |
- translate.setTranslate(bigGlyph.fVx, bigGlyph.fVy); |
- fGpuDevice->internalDrawPath(bigGlyph.fPath, skPaint, SkMatrix::I(), &translate, clipBounds, |
+ SkMatrix translate = cacheBlob->fViewMatrix; |
+ translate.postTranslate(bigGlyph.fVx, bigGlyph.fVy); |
+ |
+ fGpuDevice->internalDrawPath(bigGlyph.fPath, skPaint, translate, &pathMatrix, clipBounds, |
false); |
} |
} |