Unverified Commit 7d2b0113 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub

Fix logic error in `markNeedsPaint` (#112735)

* Update object.dart

* Update object.dart

* Update object.dart

* Update object.dart

* Update object.dart
parent 349d6486
...@@ -2627,10 +2627,13 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im ...@@ -2627,10 +2627,13 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
} }
return true; return true;
}()); }());
// If we're the root of the render tree (probably a RenderView), // If we are the root of the render tree and not a repaint boundary
// then we have to paint ourselves, since nobody else can paint // then we have to paint ourselves, since nobody else can paint us.
// us. We don't add ourselves to _nodesNeedingPaint in this // We don't add ourselves to _nodesNeedingPaint in this case,
// case, because the root is always told to paint regardless. // because the root is always told to paint regardless.
//
// Trees rooted at a RenderView do not go through this
// code path because RenderViews are repaint boundaries.
if (owner != null) { if (owner != null) {
owner!.requestVisualUpdate(); owner!.requestVisualUpdate();
} }
......
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