diff options
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r-- | src/core/SkDraw.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index b35d7f9f4c..177d38f535 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1628,9 +1628,18 @@ void SkDraw::drawGlyphRunList( return; } - auto perPathBuilder = [this](const SkPaint& paint, SkArenaAlloc*) { - auto perPath = [this, &paint](const SkPath& path, const SkMatrix& matrix) { - this->drawPath(path, paint, &matrix, false); + SkMatrix renderMatrix{*fMatrix}; + auto perPathBuilder = [this, &renderMatrix] + (const SkPaint& paint, SkScalar scaleMatrix, SkArenaAlloc*) { + renderMatrix.setScale(scaleMatrix, scaleMatrix); + auto perPath = + [this, &renderMatrix, &paint] + (const SkPath* path, const SkGlyph&, SkPoint position) { + if (path != nullptr) { + renderMatrix[SkMatrix::kMTransX] = position.fX; + renderMatrix[SkMatrix::kMTransY] = position.fY; + this->drawPath(*path, paint, &renderMatrix, false); + } }; return perPath; }; |