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.
Intent
Add API to get the outline commands for a glyph without caching results into
outline_command_cache
.Context
I am trying to build a font renderer for low powered and memory constrained devices. Since I am caching the results myself (storing the commands on the GPU for on-GPU rendering - e.g. the Dobbie Method), an uncached version of getting the outline commands allows me to save some memory and avoid a hashmap lookup.
Extra
I've amended the
outline_command_cache
value type andswash_outline_commands
return type toBox<[T]>
to:Vec
isn't storing any unused capacity (it isn't from my inspection, but, I think it helps enforce that requirement).capacity
value