Skip to content

vello_hybrid: paint external textures through the regular image paint path - #110

Merged
nicoburns merged 1 commit into
mainfrom
devin/1790971794-hybrid-external-textures
Oct 2, 2026
Merged

nicoburns merged 1 commit into
mainfrom
devin/1790971794-hybrid-external-textures

Conversation

@nicoburns

Copy link
Copy Markdown
Member

Summary

This follows up #109. With vello_gpu 0.3, external textures are an ordinary image paint (ImageSource::external_texture, linebender/vello#1824). So anyrender_vello_hybrid no longer needs to treat them as a special case.

  • anyrender_paint_to_vello_hybrid_paint now maps Paint::Resource(ImageBrush<ResourceId>) to PaintType::Image(ImageBrush { image: ImageSource::external_texture(id, full_texture_rect, true), sampler }). It looks the texture up in texture_bindings and falls back to transparent when there is no binding.
  • fill no longer has its own Paint::Resource branch. Textures now work for fill, stroke and draw_glyphs (and so inside layers too), as they already did for the vello backend.
  • The whole ImageBrush is now used: sampler extend modes, quality and alpha, plus brush_transform on any shape.
  • Behaviour change: with brush_transform: None, the texture is now anchored at the shape's coordinate origin. Before, it was anchored at the shape's bounding-box origin. This matches anyrender_vello. Blitz custom widgets (e.g. examples/wgpu_texture) fill a rect at (0, 0), so they are unaffected.
  • draw_glyphs now calls reset_paint_transform(). Previously, glyph paints could inherit a stale brush_transform left over from an earlier fill or stroke.

No public API changes. WebGL is unchanged, since it has no texture bindings.

Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/45dbc6c083354777aaa43442ce8ef8ab
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/45dbc6c083354777aaa43442ce8ef8ab?variant=devin-insiders
Requested by: @nicoburns

… path

Paint::Resource now maps to an ImageSource::external_texture image paint in
anyrender_paint_to_vello_hybrid_paint, so textures work for fill, stroke and
glyphs, and the full ImageBrush (sampler + brush_transform) is honoured.
Also reset the paint transform before drawing glyphs.
@staging-devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@nicoburns
nicoburns merged commit c3c6b51 into main Oct 2, 2026
9 checks passed
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.

1 participant