Skip to content

vello_cpu: Support custom atlas size#1658

Draft
fundon wants to merge 16 commits into
linebender:mainfrom
fundon:vello_cpu_supports_custom_atlas_size
Draft

vello_cpu: Support custom atlas size#1658
fundon wants to merge 16 commits into
linebender:mainfrom
fundon:vello_cpu_supports_custom_atlas_size

Conversation

@fundon

@fundon fundon commented May 18, 2026

Copy link
Copy Markdown

Currently, the atlas size is not customizable and DEFAULT_GLYPH_ATLAS_SIZE can cause excessive memory usage.

And expose Resources::before_render Resources::after_render methods, so this part of code can be simplified.

The behavior of vello_cpu Resources and vello_hybrid Resources will be more consistent.

@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch 2 times, most recently from 324bc59 to 0820789 Compare May 18, 2026 20:19
@LaurenzV

Copy link
Copy Markdown
Collaborator

I can get behind configuring the atlas size, but not why you want to expose before_render/after_render? This is supposed to be abstracted away from the user.

@LaurenzV

LaurenzV commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Oh, I see now this is in parley… I believe this is still using an older version of vello CPU, so the code hasn’t been updated yet. It should be possible to remove all of this.

@fundon

fundon commented May 18, 2026

Copy link
Copy Markdown
Author

Another scenario is that after rendering, we can pass atlas.get(glyph_key), and then we can upload the atlas to our custom GPU texture.

@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch 2 times, most recently from dd48b07 to 384f82f Compare May 19, 2026 07:29
@fundon

fundon commented May 19, 2026

Copy link
Copy Markdown
Author

It should be possible to remove all of this.

I hope there is a more concise way. After rendering, cache it into GlyphAtlas, and subsequent users can easily obtain data from GlyphAtlas::get.

@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch 2 times, most recently from 67bc973 to e9bd487 Compare May 19, 2026 09:00

@LaurenzV LaurenzV left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall.

Comment thread sparse_strips/vello_cpu/src/render.rs Outdated
@LaurenzV

Copy link
Copy Markdown
Collaborator

By the way, I do want to warn you that the atlas caching API is still experimental and not meant for production use yet. While it seems to work, there are still a number of issues to resolve, especially around performance when zooming.

@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch from e9bd487 to aa109c3 Compare May 19, 2026 18:40
@fundon

fundon commented May 19, 2026

Copy link
Copy Markdown
Author

By the way, I do want to warn you that the atlas caching API is still experimental and not meant for production use yet. While it seems to work, there are still a number of issues to resolve, especially around performance when zooming.

Ok. I'll give feedback if there are any problems. Thanks.

@LaurenzV LaurenzV self-requested a review May 21, 2026 07:51
@fundon fundon marked this pull request as draft May 21, 2026 16:55
@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch 4 times, most recently from 2256be9 to 16723f9 Compare May 27, 2026 13:38
@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch from 16723f9 to f18bb11 Compare June 2, 2026 00:51
@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch 6 times, most recently from 448e213 to 46d3984 Compare June 19, 2026 02:42
@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch from 22bc519 to d41b96b Compare June 27, 2026 09:47
Outside glifo, position corrected by bbox of colr glyph
@fundon fundon force-pushed the vello_cpu_supports_custom_atlas_size branch from d41b96b to 582652b Compare June 27, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants