Skip to content

Commit 8089a30

Browse files
authored
Remove obsolete drawShadow bounds workaround (#127052)
This workaround was created 6 years ago with no links to bug databases to track. As best we can determine, the issue is no longer present in SkPicture or DisplayList and is most likely obsolete. More importantly, though, non-rendering primitives are ignored by the DisplayList construction and so this workaround will just be ignored anyway. If a problem surfaces about this issue that we haven't discovered by a thorough code search of the current code base, then workarounds should be installed within the relevant implementation modules rather than in the framework (and documented with bugs filed in either or both of Flutter's github repos, and/or the Skia issue database). Workaround originally created in this PR: flutter/flutter#9654
1 parent 718f444 commit 8089a30

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

packages/flutter/lib/src/rendering/proxy_box.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,6 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
20172017

20182018
_updateClip();
20192019
final RRect offsetRRect = _clip!.shift(offset);
2020-
final Rect offsetBounds = offsetRRect.outerRect;
20212020
final Path offsetRRectAsPath = Path()..addRRect(offsetRRect);
20222021
bool paintShadows = true;
20232022
assert(() {
@@ -2038,14 +2037,6 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
20382037

20392038
final Canvas canvas = context.canvas;
20402039
if (elevation != 0.0 && paintShadows) {
2041-
// The drawShadow call doesn't add the region of the shadow to the
2042-
// picture's bounds, so we draw a hardcoded amount of extra space to
2043-
// account for the maximum potential area of the shadow.
2044-
// TODO(jsimmons): remove this when Skia does it for us.
2045-
canvas.drawRect(
2046-
offsetBounds.inflate(20.0),
2047-
_transparentPaint,
2048-
);
20492040
canvas.drawShadow(
20502041
offsetRRectAsPath,
20512042
shadowColor,

0 commit comments

Comments
 (0)