-
Notifications
You must be signed in to change notification settings - Fork 28.7k
TextPainter throw with stack trace to help track down read-before-layout #108571
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
TextPainter throw with stack trace to help track down read-before-layout #108571
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if (!_systemFontsChangeScheduled) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this guard? It looks like you only schedule the callback when _systemFontsChangeScheduled is false, and the only way to reset it back to false is in the callback. Is it ever possible that we have a callback scheduled but don't want to run it anymore?
Maybe just turn this into an assert?
…t-changes-between-frames
Related: #108029
Also defer
RenderParagraph.systemFontsDidChange
to transient frame callbacks so hit-tests / gestures / post frame callbacks can safely read text layout.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.