summaryrefslogtreecommitdiff
path: root/libs/hwui/SkiaCanvas.cpp
diff options
context:
space:
mode:
authorNathaniel Nifong <nifong@google.com>2020-01-10 16:12:41 -0500
committerNathaniel Nifong <nifong@google.com>2020-01-10 16:13:50 -0500
commit52d3777a26d654ee4c0651e6894c97b5d4d78fdd (patch)
tree749fcc63eef1051b51fb753fa2aed4775e119711 /libs/hwui/SkiaCanvas.cpp
parent1958e4c2b1de0219a7e6c4d2f959018f19ea3af2 (diff)
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
Diffstat (limited to 'libs/hwui/SkiaCanvas.cpp')
-rw-r--r--libs/hwui/SkiaCanvas.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp
index 23140724ef64..12681ae221d5 100644
--- a/libs/hwui/SkiaCanvas.cpp
+++ b/libs/hwui/SkiaCanvas.cpp
@@ -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);
+ });
}
// ----------------------------------------------------------------------------