Add space to the clipping region of physical model layers with shadows (#9654)
This commit is contained in:
parent
9c1aba2abe
commit
2ab631b702
@ -472,6 +472,12 @@ class PaintingContext {
|
|||||||
childContext._stopRecordingIfNeeded();
|
childContext._stopRecordingIfNeeded();
|
||||||
} else {
|
} else {
|
||||||
if (elevation != 0) {
|
if (elevation != 0) {
|
||||||
|
// The drawShadow call doesn't add the region of the shadow to the
|
||||||
|
// picture's bounds, so we draw a hardcoded amount of extra space to
|
||||||
|
// account for the maximum potential area of the shadow.
|
||||||
|
// TODO(jsimmons): remove this when Skia does it for us.
|
||||||
|
canvas.drawRect(offsetBounds.inflate(20.0),
|
||||||
|
new Paint()..color=const Color(0));
|
||||||
canvas.drawShadow(
|
canvas.drawShadow(
|
||||||
new Path()..addRRect(offsetClipRRect),
|
new Path()..addRRect(offsetClipRRect),
|
||||||
const Color(0xFF000000),
|
const Color(0xFF000000),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user