iris: process dirty widgets one at a time
This commit is contained in:
1 parent
b1416d86bf
commit
77b39a97e3
2 files changed
+41
-47
No files matched your search
+6
-5
@@ -141,11 +141,12 @@ which is correct always, just not free.
|
||||
|
||||
**Size invalidation travels upward before drawing; drawing itself travels only
|
||||
downward.** Every active widget retains the direct children whose size it read
|
||||
through `DrawResult::size()` or `Painter::known_len`. Before a frame draws,
|
||||
`redraw_updates` follows only those dependency edges from each dirty child and
|
||||
marks the affected ancestors dirty. It then selects the highest dirty roots and
|
||||
draws them top-down. Drawing never synchronously invalidates or invokes a
|
||||
parent, so there is no layout recursion and no provisional child draw on a
|
||||
through `DrawResult::size()` or `Painter::known_len`. `redraw_updates` takes
|
||||
one id from the dirty set, follows only those dependency edges upward and marks
|
||||
that path dirty, then redraws its highest already-dirty ancestor. Drawing that
|
||||
ancestor consumes the marks of every dirty descendant it reaches; the loop
|
||||
then takes whatever remains. Drawing never synchronously invalidates or invokes
|
||||
a parent, so there is no layout recursion and no provisional child draw on a
|
||||
different layer.
|
||||
|
||||
An exact `size_hint` stops propagation when both axes still equal the retained
|
||||
|
||||
Reference in new issue
Block a user