diff options
author | 2023-09-12 16:05:44 +0900 | |
---|---|---|
committer | 2023-09-27 07:56:51 +0000 | |
commit | cd348c679ec577c47b74dbeb7bf80a15ced80202 (patch) | |
tree | 1e79508dd2b2838019619fa013a8050c6d37d53e /libs/hwui/SkiaCanvas.cpp | |
parent | 49a911556b0a996d7f7170a0ff556a43151c048e (diff) |
Draw a single underline if multiple fonts are used in a single line.
Bug: 297336724
Test: atest hwui_unit_tests (with flag on/off)
Change-Id: I48018abd68c767c9c7ad08722a8974efc1bfe67c
Diffstat (limited to 'libs/hwui/SkiaCanvas.cpp')
-rw-r--r-- | libs/hwui/SkiaCanvas.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 8394c3cd4175..31fc929dfcdf 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -47,6 +47,7 @@ #include <utility> #include "CanvasProperty.h" +#include "FeatureFlags.h" #include "Mesh.h" #include "NinePatchUtils.h" #include "VectorDrawable.h" @@ -795,7 +796,9 @@ void SkiaCanvas::drawGlyphs(ReadGlyphFunc glyphFunc, int count, const Paint& pai sk_sp<SkTextBlob> textBlob(builder.make()); applyLooper(&paintCopy, [&](const SkPaint& p) { mCanvas->drawTextBlob(textBlob, 0, 0, p); }); - drawTextDecorations(x, y, totalAdvance, paintCopy); + if (!text_feature::fix_double_underline()) { + drawTextDecorations(x, y, totalAdvance, paintCopy); + } } void SkiaCanvas::drawLayoutOnPath(const minikin::Layout& layout, float hOffset, float vOffset, |