Skip to content

Commit 7d2b011

Browse files
authored
Fix logic error in markNeedsPaint (#112735)
* Update object.dart * Update object.dart * Update object.dart * Update object.dart * Update object.dart
1 parent 349d648 commit 7d2b011

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,10 +2627,13 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
26272627
}
26282628
return true;
26292629
}());
2630-
// If we're the root of the render tree (probably a RenderView),
2631-
// then we have to paint ourselves, since nobody else can paint
2632-
// us. We don't add ourselves to _nodesNeedingPaint in this
2633-
// case, because the root is always told to paint regardless.
2630+
// If we are the root of the render tree and not a repaint boundary
2631+
// then we have to paint ourselves, since nobody else can paint us.
2632+
// We don't add ourselves to _nodesNeedingPaint in this case,
2633+
// because the root is always told to paint regardless.
2634+
//
2635+
// Trees rooted at a RenderView do not go through this
2636+
// code path because RenderViews are repaint boundaries.
26342637
if (owner != null) {
26352638
owner!.requestVisualUpdate();
26362639
}

0 commit comments

Comments
 (0)