Commit 2ab631b7 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Add space to the clipping region of physical model layers with shadows (#9654)

parent 9c1aba2a
......@@ -472,6 +472,12 @@ class PaintingContext {
childContext._stopRecordingIfNeeded();
} else {
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(
new Path()..addRRect(offsetClipRRect),
const Color(0xFF000000),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment