Fix the antialiasing of quad primitives
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
The Quad AA code has a few bugs:
- The batching code sets the wrong flag for some of the AA segments
- The shader incorrectly computes the position of the AA SDF by picking the loal rect after offsetting the sides. This causes the center part to always have AA applied to all of its side. This bug partially papers over the previous one and prevents AA from being applied to a subset of edges of a primitive.
- The AA segmentation has cracks sometimes (including multiple reftests). I don't know for sure if it is caused by the T-junctions in the segmentation or if it is an artifact of the previous described issues.
- The current segmentation only works if all segments are anti-aliased because the corners are covered by the left and right parts. If the top or bottom edge is not anti-aliased, then the side AA segments extend too far up/down.
| Assignee | ||
Comment 1•7 months ago
|
||
| Assignee | ||
Comment 2•7 months ago
|
||
| Assignee | ||
Comment 3•7 months ago
|
||
We used to be able to select which edges get anti-aliased for linear gradient primitives. That got lost in the transition to quads and is needed for all other patterns.
This patch adds plumbing for specifying which edges to antialias with two possible configurations: with or without an axis-aligned transform. CSS primitives don't anti-alias axis-aligned primitives, but SVG primitives should (alas they currently don't).
I suspect that with upocming changes to snapping we may end up representing this distinction some other way, but with this patch, the code internally at least reflects the options that we need to eventually support correctly.
For now the most pressing concern is that primitives need to be able to not anti-alias certain edges to avoid seams within items that are segmented inot multiple primitives. This is already the case of linear and radial gradients in some situations, and will probably be needed for the segmentation of border nine-patches.
| Assignee | ||
Comment 4•7 months ago
|
||
| Assignee | ||
Comment 5•7 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c9bc9d58e519
https://hg.mozilla.org/mozilla-central/rev/755daf79f573
https://hg.mozilla.org/mozilla-central/rev/17c7347a64e4
https://hg.mozilla.org/mozilla-central/rev/f7e663d3d570
https://hg.mozilla.org/mozilla-central/rev/37c8f604eb1b
Comment 9•7 months ago
|
||
| bugherder | ||
Updated•6 months ago
|
Description
•