Artifacts when rendering mitered paths
Categories
(Core :: Graphics: Canvas2D, defect, P2)
Tracking
()
People
(Reporter: calixte, Assigned: jrmuizel)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [sp3])
Attachments
(5 files)
It's a mirror bug of:
https://github.com/mozilla/pdf.js/issues/16619
There are some artifacts when rendering the path.
It's ok with gfx.canvas.accelerated set to false.
:lsalzman, any idea ?
Comment 1•3 years ago
|
||
Regression range:
Bug 1803604 - Use aa-stroke to accelerate stroked paths in Canvas2D. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D163609
Comment 2•3 years ago
|
||
Set release status flags based on info from the regressing bug 1803604
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Jeff, this looks like a bug in aa-stroke itself. Repros on Linux too (reporter on Mac). Doesn't appear to be driver specific.
Comment 4•3 years ago
|
||
Calixte, can this please me made into a standalone, non-pdf testcase, just calling directly into Canvas2D? That would make it easier to debug. The PDF is pretty opaque.
| Reporter | ||
Comment 5•3 years ago
|
||
| Reporter | ||
Comment 6•3 years ago
|
||
On mac, with 114.0.2, the attached html is ok but the pdf is not...
With nightly, both test cases have the artifacts.
| Reporter | ||
Comment 7•3 years ago
|
||
Here's a very reduced test case.
The artifacts are two thin dotted lines tangent to the bezier curves.
| Reporter | ||
Comment 8•3 years ago
|
||
I just tested the three test cases on Windows 11 with gfx.canvas.accelerated set to true, and all of them are showing the artifacts.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Set release status flags based on info from the regressing bug 1803604
Comment 10•3 years ago
|
||
(I'm adding this comment in case the linked En-ROADS example is useful in verifying the eventual fix for the underlying issue. I didn't think it warranted it's own issue since the underlying problem seems the same; apologies if piling on to an existing issue is bad form.)
I believe this is the same issue that we are encountering in En-ROADS, where there are sporadic rendering artifacts seen on certain line graphs. See attached screenshot (en-roads-1.png).
This started appearing after upgrading to Firefox 115 (I'm on macOS). The bug appears only at certain window sizes. It can be reproduced by slowly changing the browser window width.
I verified that the bug does not appear after disabling the new aa stroke renderer flag (gfx.canvas.accelerated.aa-stroke.enabled = false). Unchecking the "Use hardware acceleration when available" setting also has the same effect, as expected.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 11•2 years ago
|
||
It looks like there's some numerical instability around miter joins. I hope to solve it by the end of the week.
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 12•2 years ago
|
||
This updates aa-stroke to fef8702c4c8afd7d47e7a5aafb6fa347c96b50be
which fixes some degenerate behaviour when mitering parallel lines.
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
| bugherder | ||
Comment 16•2 years ago
|
||
Backed out as requested by jrmuizel
| Assignee | ||
Comment 17•2 years ago
|
||
Backed out for making bug 1849487 worse.
Comment 18•2 years ago
|
||
FWIW, the reduced testcase did improve with the (now backed out) patch. But the original pdf still has those dotted lines that appear-disappear at different zoom levels, and become permanent after a certain zoom level (300% on my machine)
Comment 19•2 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/cc8d561a9b40
Comment 20•2 years ago
|
||
| backout bugherder | ||
Updated•2 years ago
|
Comment 21•2 years ago
|
||
Updated•2 years ago
|
Comment 22•2 years ago
|
||
| bugherder | ||
Comment 23•2 years ago
|
||
(In reply to Mayank Bansal from comment #18)
FWIW, the reduced testcase did improve with the (now backed out) patch. But the original pdf still has those dotted lines that appear-disappear at different zoom levels, and become permanent after a certain zoom level (300% on my machine)
This is still true. The original pdf still has dotted line artifacts.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 24•2 years ago
|
||
| uplift | ||
Comment 25•2 years ago
|
||
| bugherder uplift | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reproducible on a 2023-08-24 Nightly build on macOS 12.
Verified as fixed on Firefox 119.0b2(build ID: 20230928191344) and Nightly 120.0a1(build ID: 20230928215127) on macOS 12, Windows 10, Ubuntu 22.
Description
•