vello_common: Replace external guillotiere with built-in no_std-compatible port#1481
Merged
Conversation
b7d424b to
8e7f4af
Compare
Collaborator
Author
|
Hey @LaurenzV, I think I’d prefer to merge this for now, and then once servo/euclid#543 is merged and |
LaurenzV
approved these changes
Mar 3, 2026
Collaborator
LaurenzV
left a comment
There was a problem hiding this comment.
LGTM, double-checked by copy-pasting the code snippets from guillotiere and wasn't able to find any relevant discrepancies.
8e7f4af to
1b9560c
Compare
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.
The glyph rendering path in
parley_drawI've been working on depends onmulti_atlasandimage_cachefor atlas allocation. Sinceguillotiererequiresstd(viaeuclid/num-traits), these modules were gated behindcfg(feature = "std"), which would force the entire glyph rendering pipeline to bestd-gated as well. Porting the allocator tono_stdremoves this constraint and keeps the glyph rendering path available inno_stdbuilds.This PR imports and modifies
guillotiere's tree-based guillotine algorithm directly intoallocator.rs, replacingeuclidtypes with localSize/Point/Rectequivalents and swappingstdimports forcore/alloc.We discussed in one of the recent office hours that it would be fine to add the simpler shelf allocator under
vello_common/. However, since my glyph caching is already based on the ability to deallocate, I thought there was no harm in continuing to use the current algorithm. I have not added this to upstream because I am not aware of the plan there or the current review capacity, but I am happy to do so if we decide that is the right approach.