Add saveLayer back if there's an overflowShader (#18739)
This should fix https://github.com/flutter/flutter/issues/18729 I'll add a gold test, and try to figure out how to remove the saveLayer without affecting the correctness later.
This commit is contained in:
parent
e62626fd56
commit
e4f08d55c2
@ -355,7 +355,13 @@ class RenderParagraph extends RenderBox {
|
||||
|
||||
if (_hasVisualOverflow) {
|
||||
final Rect bounds = offset & size;
|
||||
if (_overflowShader != null) {
|
||||
// This layer limits what the shader below blends with to be just the text
|
||||
// (as opposed to the text and its background).
|
||||
canvas.saveLayer(bounds, new Paint());
|
||||
} else {
|
||||
canvas.save();
|
||||
}
|
||||
canvas.clipRect(bounds);
|
||||
}
|
||||
_textPainter.paint(canvas, offset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user