fix(core): shadow-aware incremental damage bounds#49
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7144acb8c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| private appendDamageRectForInstanceId(instanceId: InstanceId): boolean { | ||
| const current = this._pooledRectByInstanceId.get(instanceId); | ||
| const current = this._pooledDamageRectByInstanceId.get(instanceId); |
There was a problem hiding this comment.
Recompute shadow damage bounds on layout-skipped commits
appendDamageRectForInstanceId now pulls from _pooledDamageRectByInstanceId, but that map is only rebuilt during the layout-index pass (buildLayoutRectIndexes), so commits that skip layout can use stale shadow-aware bounds. Because shadow changes are not layout-driving, toggling a box shadow on (or increasing offsets) in a commit with layout: false can produce an undersized damage region, so incremental redraw clips away part of the newly visible shadow until a later full/layout render.
Useful? React with 👍 / 👎.
Summary
boxwidgetsRoot Cause
Incremental redraw used layout rects (box body only) for damage intersection and child culling. Box shadows are rendered outside those rects (right/bottom), so shadow-only intersections were skipped and stale artifacts could remain until a full redraw/resize.
Validation