Use pixel diffs in Vello Tests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
We're currently using `nv-flip` for Vello Classic's tests, but this doesn't work well for 2d imaging screenshots.
As such, we've moved away from it in Masonry - https://github.com/linebender/xilem/pull/904, and here for the new sparse strip tests.
We should do the same for Vello Classic.
The main thing which would need to change is the code around here:
https://github.com/linebender/vello/blob/a97dddc9655c576d72e563a4c633efecaf2315ca/vello_tests/src/snapshot.rs#L62-L80
We don't need to make this overly configurable; we just want a threshold which all the current tests pass.
We plan to merge the Vello Classic and Sparse Strips test suites in the foreseeable future, so a quick-and-dirty solution here is fine.
The diff algorithm in Vello Sparse Strips can be found at:
https://github.com/linebender/vello/blob/a97dddc9655c576d72e563a4c633efecaf2315ca/sparse_strips/vello_sparse_tests/tests/util.rs#L443-L511
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in vello_tests/src/snapshot.rs around the current nv-flip comparison, then read the pixel-diff algorithm in sparse_strips/vello_sparse_tests/tests/util.rs. Replace the Vello Classic comparison with a threshold-based pixel diff, choosing a threshold that lets all current tests pass. Run the Vello Classic test suite to verify the snapshots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, testing-qa
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100