Use golang.org/x/image/vector directly#28
Merged
andydotxyz merged 1 commit intogo-text:mainfrom Apr 17, 2026
Merged
Conversation
Contributor
|
Looks very good to me, and the new tests snapshots are OK. |
benoitkugler
approved these changes
Apr 17, 2026
andydotxyz
approved these changes
Apr 17, 2026
Contributor
andydotxyz
left a comment
There was a problem hiding this comment.
I can barely tell the difference but could be persuaded that the latter is a tad sharper.
Either way the performance improvement is good news.
It will break all our golden masters in Fyne too - but these things do happen some times, we can group a few together for the next big release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When rasterx is used with Filler, it uses golang.org/x/image/vector rasterizer. We can improve performance by using the rasterizer directly. This saves on the conversions from Int26_6 to float etc.
Unfortunately, it doesn't draw pixel perfect to the old snapshot tests. IMO it is probably more accurate, since a lot of float operations are now gone (I can't tell the difference visually).
Benchmark: