-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SVG rendering performance improvements
This continues the work from the prior commit to provide even more significant performance gains: * Prior caching of `font.Drawer` was not working correct. This was updated to just caching the `font.Face`, and results in signficiant performance gains when measuring text due to avoiding needing to allocate the backend image for performing the measurement. * Additionally `styleAsSVG` was further improved both by speeding up `rgb` Color writting and the font style using the bytes.Buffer. * `canvas` reuses the `bytes.Buffer` used for generating the output, reducing the need to both allocate, and expand the Buffer while rendering the SVG.
- Loading branch information
Showing
4 changed files
with
83 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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