Reorder the drawing of underline/stroke and text
The underline and stroke should be top of the text.
This regression happens on O-MR1 and the root cause is still unknown,
but the drawning underline/stroke should do before drawing text.
Bug: 79906191
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
Change-Id: Idc2f99b9c0fa125af331e496da8daa326d14bfac
This commit is contained in:
@@ -824,6 +824,9 @@ public class TextLine {
|
||||
wp.setColor(previousColor);
|
||||
}
|
||||
|
||||
drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl,
|
||||
leftX, y + wp.baselineShift);
|
||||
|
||||
if (numDecorations != 0) {
|
||||
for (int i = 0; i < numDecorations; i++) {
|
||||
final DecorationInfo info = decorations.get(i);
|
||||
@@ -866,8 +869,6 @@ public class TextLine {
|
||||
}
|
||||
}
|
||||
|
||||
drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl,
|
||||
leftX, y + wp.baselineShift);
|
||||
}
|
||||
|
||||
return runIsRtl ? -totalWidth : totalWidth;
|
||||
|
||||
Reference in New Issue
Block a user