aa-stroke fails to render half-arcs
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
People
(Reporter: tristan.fraipont, Assigned: jrmuizel)
References
(Regression)
Details
(Keywords: regression)
Attachments
(9 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0
Steps to reproduce:
Originally reported at https://stackoverflow.com/questions/77584584/line-endings-in-js-canvas-arc-function-bug-in-firefox
Online test case (jsffidle).
Stroke an half arc using a line-width equal to the arc's diameter.
Actual results:
The stroke does overlap in the center of the arc and fails to render the extremities of the arc (see the various attached screenshots, and particularly xor.png).
Expected results:
A clean half circle should have been drawn.
This only happens when using GPU rendering and is caused by this CL. At that time, the bug was a bit different (see attachment initial-bug.png). Since this CL it is in the current state.
The whole strategy of https://bugzilla.mozilla.org/show_bug.cgi?id=1837068 seems very fragile. Even when using smaller line-width, the composition over the antialias will result in visible holes (see holes.png, where I added the red circles in post prod and holes.html).
I even had a temporary aliasing bug when rendering the stroke with some alpha where I could see each lines of the stroke converging to the center of the arc. I unfortunately failed to take a screenshot of that and couldn't repro since then, even during bisect.
Updated•2 years ago
|
Comment 6•2 years ago
•
|
||
The arc rendering issue is probably a dupe of bug 1867774. The hole rendering issue was first seen in https://bugzilla.mozilla.org/attachment.cgi?id=9341757
Oh, indeed, bug 1867774 is about the same issue, sorry I missed it.
From which bug comes the hole screenshot though?
Comment 8•2 years ago
|
||
As expected, caused by bug 1834079.
Comment 9•2 years ago
|
||
Not sure what severity we should give. Looks fairly serious, and is a recent regression related to some speedometer 3 improvements in rendering path selection.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Windows is unaffected (because of d2d?) but other platforms are affected. jrmuizel has repro'd.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 11•2 years ago
|
||
Can reproduce this in a standalone test case
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 14•1 year ago
|
||
Yes, I want to stroke/offset curves during flattening instead of flattening first and then stroking. This will let us have proper tangents and the start and end of the curve instead of the tangents of the flattened curve. The thing that blocks this from being easy to implement is the possibility of self intersection for a particular segment.
If we wanted to mitigate this problem temporarily we could just adjust the flattening tolerance in proportion to the line width.
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
This fixes drawing half arcs, reduces the triangle count when flattening
because we don't have joins and thus improves performance.
Comment 17•1 year ago
|
||
Comment 18•1 year ago
|
||
Backed out for causing mochitest failures @test_toDataURL_parameters_png.html.
Comment 19•1 year ago
|
||
Comment 20•1 year ago
|
||
Comment 21•1 year ago
|
||
Comment 22•1 year ago
|
||
| bugherder | ||
Comment 25•1 year ago
|
||
Backed out as requested by dev for causing Bug 1937287
Comment 26•1 year ago
|
||
Backout merged in central: https://hg.mozilla.org/mozilla-central/rev/a4854d53bebf4f7c63929ea009fbd634db1e590d.
Comment 27•1 year ago
|
||
Comment 28•1 year ago
|
||
Backed out for causing build bustages.
Comment 29•1 year ago
|
||
Comment 30•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Comment 31•1 year ago
|
||
The patch landed in nightly and beta is affected.
:jrmuizel, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval. Also, don't forget to request an uplift for the patches in the regressions caused by this fix.
- If no, please set
status-firefox134towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 32•1 year ago
|
||
We've been shipping this long enough on other platforms and the implementation has enough risk that I'd prefer to let this bake.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•