Skip to content

Comments

vello_hybrid: Optimize rendering of opaque full-tile images#1461

Merged
grebmeg merged 4 commits intomainfrom
gemberg/vh-opaque-image-perf-impr
Feb 23, 2026
Merged

vello_hybrid: Optimize rendering of opaque full-tile images#1461
grebmeg merged 4 commits intomainfrom
gemberg/vh-opaque-image-perf-impr

Conversation

@grebmeg
Copy link
Collaborator

@grebmeg grebmeg commented Feb 20, 2026

Skip prior draw commands when a wide tile is fully covered by an opaque fill (opaque image). This avoids unnecessary compositing work for tiles that would be entirely overwritten.

I also added additional examples that allocate more and more images when pressing “a”, so I could run a very rough benchmark. It shows roughly a 1.65x improvement in the image randomized positioning scenario.

I am not entirely happy with the approach of carrying may_have_opacities inside ImageSource, but I have not come up with a better solution yet. I would really welcome any ideas if you have suggestions.

before after
before.mp4
after.mp4

Copy link
Collaborator

@LaurenzV LaurenzV left a comment

Choose a reason for hiding this comment

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

.

Copy link
Collaborator

@LaurenzV LaurenzV left a comment

Choose a reason for hiding this comment

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

Will leave it up to you whether you want to rename or not.

@grebmeg grebmeg force-pushed the gemberg/vh-opaque-image-perf-impr branch from 6a28f6a to 3c2dc37 Compare February 23, 2026 09:44
@grebmeg grebmeg enabled auto-merge February 23, 2026 09:51
@grebmeg grebmeg added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit 5fdecf2 Feb 23, 2026
17 checks passed
@grebmeg grebmeg deleted the gemberg/vh-opaque-image-perf-impr branch February 23, 2026 10:02
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