Layer shapes are wrong
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
As reported in #vello > Servo 2D canvas backend @ 💬 vello currently chooses to big size (and they are also off) for layers, I suspect something is wrong with binning.
For this code (also available as smoke test https://github.com/linebender/vello/pull/1062):
scene.fill(
vello::peniko::Fill::NonZero,
Affine::IDENTITY,
vello::peniko::color::AlphaColor::from_rgb8(0, 255, 0),
None,
&Rect::from_origin_size((0.0, 0.0), (60., 60.)),
);
scene.push_layer(
vello::peniko::Compose::Clear,
1.0,
vello::kurbo::Affine::IDENTITY,
&Rect::from_origin_size((20.0, 20.0), (20., 20.)),
);
scene.pop_layer();
scene.fill(
vello::peniko::Fill::NonZero,
Affine::IDENTITY,
vello::peniko::color::AlphaColor::from_rgb8(255, 0, 0),
None,
&Rect::from_origin_size((20.0, 20.0), (20., 20.)),
);
one would expect to get
but what we actually get is
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 with the layer reproduction shown in the issue and the smoke test linked in PR #1062. Compare the expected and actual output, then trace the layer binning path to determine why the layer is oversized and offset. Done means the example renders the expected green background with the cleared central layer and red shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100