Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 632393dc authored by Nathaniel Nifong's avatar Nathaniel Nifong Committed by Android (Google) Code Review
Browse files

Merge "Include text draws in looper refactor"

parents 067987f9 52d3777a
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -746,7 +746,10 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const Paint& pai
    glyphFunc(buffer.glyphs, buffer.pos);

    sk_sp<SkTextBlob> textBlob(builder.make());
    mCanvas->drawTextBlob(textBlob, 0, 0, paintCopy);

    apply_looper(&paintCopy, [&](const SkPaint& p) {
        mCanvas->drawTextBlob(textBlob, 0, 0, p);
    });
    drawTextDecorations(x, y, totalAdvance, paintCopy);
}

@@ -783,8 +786,10 @@ void SkiaCanvas::drawLayoutOnPath(const minikin::Layout& layout, float hOffset,
        xform[i - start].fTx = pos.x() - tan.y() * y - halfWidth * tan.x();
        xform[i - start].fTy = pos.y() + tan.x() * y - halfWidth * tan.y();
    }

    this->asSkCanvas()->drawTextBlob(builder.make(), 0, 0, paintCopy);
    auto* finalCanvas = this->asSkCanvas();
    apply_looper(&paintCopy, [&](const SkPaint& p) {
        finalCanvas->drawTextBlob(builder.make(), 0, 0, paintCopy);
    });
}

// ----------------------------------------------------------------------------