Unverified Commit 9a726e85 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Remove obsolete work around for shadow drawing (#131066)

Fixes https://github.com/flutter/flutter/issues/130737.
parent 99a4f7e1
......@@ -1908,8 +1908,6 @@ abstract class _RenderPhysicalModelBase<T> extends _RenderCustomClip<T> {
}
}
final Paint _transparentPaint = Paint()..color = const Color(0x00000000);
/// Creates a physical model layer that clips its child to a rounded
/// rectangle.
///
......@@ -2113,7 +2111,6 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
}
_updateClip();
final Rect offsetBounds = offset & size;
final Path offsetPath = _clip!.shift(offset);
bool paintShadows = true;
assert(() {
......@@ -2134,14 +2131,6 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
final Canvas canvas = context.canvas;
if (elevation != 0.0 && paintShadows) {
// 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),
_transparentPaint,
);
canvas.drawShadow(
offsetPath,
shadowColor,
......
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