vello_hybrid: Add render_to_atlas and write_to_atlas APIs for glyph caching#1458
Open
vello_hybrid: Add render_to_atlas and write_to_atlas APIs for glyph caching#1458
render_to_atlas and write_to_atlas APIs for glyph caching#1458Conversation
ddb4221 to
1ece907
Compare
Collaborator
|
Hmm... What I did is to change add an vello/sparse_strips/vello_hybrid/src/schedule.rs Lines 211 to 230 in b23b634 render method, would that work for you? Otherwise, seems fine at a glance, but it might be worth extracting all of the setup stuff (e.g. for encoded paints) into a wrapper function that does setup/teardown and takes a closure for the "main action". What do you think?
|
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.
Adds public APIs to both the wgpu and webgl renderers for rendering
Scenecontent directly into atlas layers and writing pixel data to pre-allocated atlas regions. This enables a glyph caching workflow where vector glyphs are rasterized into the atlas once and reused as cached images in subsequent passes.The key additions are
render_to_atlas, which runs the scheduler targeting a specific atlas layer (using a placeholder dummy texture to avoid read-write hazards), andwrite_to_atlas, extracted fromupload_image, which writes pixel data to an already-allocated region.