aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAtlasTextContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrAtlasTextContext.cpp')
-rw-r--r--src/gpu/GrAtlasTextContext.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 58244e78c2..22436f7c12 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);
}
}