WPT failures in css/css-transforms/group , for fuzzy pixels around edges of transformed SVG shapes
Categories
(Core :: SVG, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 external files, 1 obsolete file)
We have some interop2023-relevant WPT failures here:
https://wpt.fyi/results/css/css-transforms/group?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=subtest&q=label%3Ainterop-2021-transforms
Specifically, these 5 tests:
https://wpt.fyi/results/css/css-transforms/group/svg-transform-group-009.html
https://wpt.fyi/results/css/css-transforms/group/svg-transform-nested-008.html
https://wpt.fyi/results/css/css-transforms/group/svg-transform-nested-009.html
https://wpt.fyi/results/css/css-transforms/group/svg-transform-nested-014.html
https://wpt.fyi/results/css/css-transforms/group/svg-transform-nested-019.html
These all are have some green SVG content that's transformed to precisely cover up a red shape. In every case, we essentially pass the test but we have subtle "seams" at the edges of the covered up area, where the pixels are a fuzzy match (the rgb value has some small amount in the r channel and a somewhat-reduced g channel).
I think we've papered over these with fuzzy annotations locally, but the wpt.fyi harness doesn't know about those annotations. We need to either move those annotations into the test files themselves, or fix the issue such that we don't produce these "seams".
(This bug might really want to be classified under Web Painting or Graphics:WebRender, but I'm starting it in SVG since the content in question is SVG.)
| Assignee | ||
Comment 1•3 years ago
|
||
svg-transform-nested-008.html is the silliest of these; the seam isn't perceptible. It's a difference of 1 in some color channel, with
Found 50 pixels different, maximum difference per channel 1
But in other cases, e.g. svg-transform-nested-014.html, the seam is quite visible as a dark stripe, if you look closely, and the color-channel-difference is more substantial:
Found 100 pixels different, maximum difference per channel 19
| Assignee | ||
Comment 2•3 years ago
|
||
Here's a zoomed screenshot of how https://wpt.live/css/css-transforms/group/svg-transform-nested-014.html looks for me (which agrees with the wpt.fyi harness's failure screenshot).
If you look closely, you can see a dark diagonal stripe near the bottom left corner of the green square.
| Assignee | ||
Comment 3•3 years ago
•
|
||
Side note: my screenshot in Comment 2 was taken using the Linux OS-level screenshot tool, launched with the "Print Screen" key on my keyboard.
Interestingly, Firefox's own built-in "take screenshot" API doesn't reproduce the issue. :) If I use that to take a screenshot of that same test from comment 2, and paste the result into an image editor, then I get what appears to be a perfect green square -- no stripe/seam at all. I think that's sort-of expected, since IIRC our built-in screenshots use a slightly different painting codepath vs. actual painting-to-the-screen (I don't recall the details though).
| Assignee | ||
Comment 4•3 years ago
|
||
One other similar failure in a sibling directory, which I'll lump in here since it's so similar in nature to what's discussed above:
https://wpt.fyi/results/css/css-transforms/skewX/svg-skewxy-001.html
Found 189 pixels different, maximum difference per channel 10
In this one, the seam is large & visible if you look closely, similar to my screenshot in comment 2. So: worth considering whether we can adjust the test slightly to avoid creating such a large antialiased seam, rather than annotating it as fuzzy, perhaps.
| Comment hidden (obsolete) |
Updated•3 years ago
|
| Comment hidden (obsolete) |
| Assignee | ||
Comment 7•3 years ago
•
|
||
In all of these cases, it seems the corners of the red shape are 1px inwards from the corners of the (transformed) green shape.
This would make for a reasonable expectation of no-redness-showing-up at the corners of a rectangular shape, but along the diagonals (where there's <1px of horizontal and vertical "padding" at each point where the green shape is overdrawing beyond the end of the red shape), it's not entirely surprising that a little bit of the covered-up red color might leak through.
I'm preparing a patch that addresses this by moving the bounds of the red shape inwards by 1px on its top and/or bottom vertices, to give us a bit more breathing room. (It's possible we'll also need a maxDifference=1 fuzzy annotation along the lines of bug 1824242 for some of these, for rgb(0,128,0) vs rgb(0,127,0) visually-imperceptible differences in some edge pixels, related to WebRender compositing bug 1840511.)
| Assignee | ||
Comment 8•3 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #7)
I'm preparing a patch that addresses this by moving the bounds of the red shape inwards by 1px on its top and/or bottom vertices, to give us a bit more breathing room. (It's possible we'll also need a maxDifference=1 fuzzy annotation along the lines of bug 1824242 for some of these, for rgb(0,128,0) vs rgb(0,127,0) visually-imperceptible differences in some edge pixels, related to WebRender compositing bug 1840511.)
Try run: https://treeherder.mozilla.org/jobs?repo=try&revision=f5f606e3fb662b860201c383d4bd192633c5e4bf
(no fuzzy annotations yet, we'll see which test(s) need those)
| Assignee | ||
Comment 9•3 years ago
|
||
In these tests, the bounds of the red shape were technically already 1px
inwards from the bounds of the green shape (at the vertices at least), but that
still seems to create an opportunity for a little bit of red fringe along
antialiased diagonal lines. An additional pixel of "buffer" is sufficient to
avoid this fuzzy mismatch, since it ensures that the edge of the red shape is
at least a pixel inwards from the edge of the green shape along the whole
diagonal.
With that change, there are some remaining visually-imperceptible
(maxDifference of 1 in the green channel) fuzzy pixels. These ones are
unrelated to the red shape, and I'm adding annotations for them since they're
imperceptible and unrelated to what the test is trying to test.
We've got https://bugzilla.mozilla.org/show_bug.cgi?id=1840747 to track the
former issue (the red fringe), and we have
https://bugzilla.mozilla.org/show_bug.cgi?id=1840511 to track the latter issue
(off-by-1 in the green color channel).
Depends on D182295
| Assignee | ||
Comment 10•3 years ago
|
||
While removing the .ini annotations for the other tests in this bug, I noticed
these ones that seemed to also be unnecessary. The tests pass on Try with these
annotations removed, so let's try removing them (and we can add back a
more-specific annotation if we discover intermittent fuzziness down the line).
Depends on D182296
| Assignee | ||
Comment 11•3 years ago
|
||
Green Try run (with patches for this and bug 1824242):
https://treeherder.mozilla.org/jobs?repo=try&revision=93c6cacea756aabe7cdf34be62f7d6a21f4ad33a
Comment 12•3 years ago
|
||
Comment 14•3 years ago
|
||
Backed out for causing reftests failures in 1840747-1.html.
- Backout link
- Push with failures
- Failure Log
- Failure line: REFTEST TEST-UNEXPECTED-PASS | layout/reftests/bugs/1840747-1.html == about:blank | image comparison, max difference: 0, number of differing pixels: 0
Comment 16•3 years ago
|
||
While we're at it, similar fuzzyness seems to be the reason why we're not passing css/css-transforms/skew-test1.html. Should we file a new bug for that?
| Assignee | ||
Comment 17•3 years ago
|
||
(In reply to Serban Stanca [:SerbanS] from comment #14)
Backed out for causing reftests failures in 1840747-1.html.
Thanks; see notes in bug 1824242 comment 20 (the other bug in this stack). I'll re-land soon after fixing the annotation (and adding one more test that was suggested as a followup in review, and double-checking on Try).
(In reply to Thomas Wisniewski [:twisniewski] from comment #16)
While we're at it, similar fuzzyness seems to be the reason why we're not passing css/css-transforms/skew-test1.html. Should we file a new bug for that?
That one's a little different. I spun off https://bugzilla.mozilla.org/show_bug.cgi?id=1841349 for that one.
Comment 18•3 years ago
|
||
Comment 20•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4d572d4d5ba1
https://hg.mozilla.org/mozilla-central/rev/6d162c18103a
| Assignee | ||
Comment 22•3 years ago
|
||
The testcase has a green shape covering a red shape, and the vertices are close
enough to create an opportunity for a little bit of imperceptibly-red fringe
along antialiased diagonal lines. This patch shifts two vertices inwards by 1px
to create a pixel of breathing room to avoid this antialiased fringe.
| Assignee | ||
Comment 23•3 years ago
|
||
(In reply to Daniel Holbert [:dholbert] (away until Jul 24, for PTO & CSSWG meeting) from comment #4)
One other similar failure in a sibling directory, which I'll lump in here since it's so similar in nature to what's discussed above:
https://wpt.fyi/results/css/css-transforms/skewX/svg-skewxy-001.html
Found 189 pixels different, maximum difference per channel 10In this one, the seam is large & visible if you look closely, similar to my screenshot in comment 2. So: worth considering whether we can adjust the test slightly to avoid creating such a large antialiased seam, rather than annotating it as fuzzy, perhaps.
I forgot to adjust this one in the patches that landed here. I've just posted a patch for this (similar to part 1).
Comment 24•3 years ago
|
||
| Assignee | ||
Comment 26•3 years ago
|
||
Hm, so part 3 should have that test passing as far as TreeHerder is concerned (otherwise it would've been backed out), but it may still be failing with a line of fuzzy pixels on the wpt.fyi test environment for whatever reason.
https://wpt.fyi/results/css/css-transforms/skewX/svg-skewxy-001.html?sha=33d816fd73&max-count=1 shows our results for the above-linked wpt-sync-bot github PR, and it shows us still failing, with Found 189 pixels different, maximum difference per channel 10, which is the same pixel-count and max-difference as before. So it seems wpt.fyi might experiencing an ever-so-slightly-different placement or antialiasing-approach for the green or red rectangle, for whatever reason, and needs a tad more.
Comment 27•3 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 29•3 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #26)
Hm, so part 3 should have that test passing as far as TreeHerder is concerned (otherwise it would've been backed out), but it may still be failing with a line of fuzzy pixels on the wpt.fyi test environment for whatever reason.
Ah, never mind; that test is now passing on official wpt.fyi, as-expected:
https://wpt.fyi/results/css/css-transforms/skewX/svg-skewxy-001.html?label=experimental&label=master&aligned
Maybe wpt.fyi (or my understanding of it) was confused somehow in comment 26, with the view of the results for that pull-request. (Or maybe there's some intermittency here; we'll see I guess.)
Description
•