-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Perform text scaling calculations per text, not per glyph #7819
Conversation
* tidied up `extract_text_uinodes` and moved alignment translation out of loop
This looks generally pretty sound in terms of approach, but I'd like to see some backing numbers for this to show the impact. |
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.
Good changes, and a fresh benchmark! Nice work.
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.
Really like these gains, but there are a few bits about readability I want addressed before this is merged.
…_rotation_translation` instead of constructing the matrix from columns.
…t_uinodes` (part 2).
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, though I want to see some final performance numbers. I'm sure the changes made have some positive benefit, but it's ideal if we can quantify them.
Objective
The scaling calculations for text rendering are being performed per glyph but they only need to be performed per text.
Solution
Move these calculations outside of the inner loop.
Changelog
extract_text_uinodes
andextract_text2d_sprite
.