File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
packages/flutter/lib/src/rendering Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1584,12 +1584,15 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
1584
1584
if (_relayoutBoundary != this ) {
1585
1585
_relayoutBoundary = null ;
1586
1586
_needsLayout = true ;
1587
- visitChildren ((RenderObject child) {
1588
- child._cleanRelayoutBoundary ();
1589
- });
1587
+ visitChildren (_cleanChildRelayoutBoundary);
1590
1588
}
1591
1589
}
1592
1590
1591
+ // Reduces closure allocation for visitChildren use cases.
1592
+ static void _cleanChildRelayoutBoundary (RenderObject child) {
1593
+ child._cleanRelayoutBoundary ();
1594
+ }
1595
+
1593
1596
/// Bootstrap the rendering pipeline by scheduling the very first layout.
1594
1597
///
1595
1598
/// Requires this render object to be attached and that this render object
@@ -1724,9 +1727,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
1724
1727
// The local relayout boundary has changed, must notify children in case
1725
1728
// they also need updating. Otherwise, they will be confused about what
1726
1729
// their actual relayout boundary is later.
1727
- visitChildren ((RenderObject child) {
1728
- child._cleanRelayoutBoundary ();
1729
- });
1730
+ visitChildren (_cleanChildRelayoutBoundary);
1730
1731
}
1731
1732
_relayoutBoundary = relayoutBoundary;
1732
1733
assert (! _debugMutationsLocked);
You can’t perform that action at this time.
0 commit comments