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

Commit 52d3777a authored by Nathaniel Nifong's avatar Nathaniel Nifong
Browse files

Include text draws in looper refactor

Test: built for pixel3, confirm shadows on text of launcher icons visible on a background image that shows it well.
Bug:144199311
Change-Id: Ia2e71a1f0982ef94a9b0c0573bf76ead0c0b9b81
parent 1958e4c2
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);
    });
}

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