Skip to content

Remove TextNodeFlags::needs_recompute #19443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented May 30, 2025

Objective

Remove TextNodeFlags::needs_recompute. There's no need for it when relayouts can be requested by setting needs_rerender on ComputedTextBlock.

Solution

  • Remove TextNodeFlags::needs_recompute.
  • Added set_needs_rerender method to ComputedTextBlock.

Testing

If you run any of the text examples, there should be no difference in performance or behaviour compared to main.

…s_rerender` on `ComputedTextBlock` instead to request relayouts.

* Added a `set_needs_rerender` method to `ComputedTextBlock`.
@ickshonpe ickshonpe changed the title Remove TextNodeFlags::needs_recompute. Remove TextNodeFlags::needs_recompute May 30, 2025
@ickshonpe ickshonpe added C-Code-Quality A section of code that is hard to understand or change A-Text Rendering and layout for characters D-Straightforward Simple bug fixes and API improvements, docs, test and examples A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant