[HWA] Stroking a single rect with transform doesn't use antialising
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr102 | --- | unaffected |
| firefox107 | --- | disabled |
| firefox108 | --- | disabled |
| firefox109 | --- | fixed |
People
(Reporter: tristan.fraipont, Assigned: lsalzman)
References
(Blocks 1 open bug, Regressed 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
Steps to reproduce:
- Ensure to have
gfx.canvas.acceleratedflag set on. - Set a canvas 2D context current transform to a rotated matrix.
- Stroke a rectangle on that context.
Actual results:
The rectangle is stroked without antialiasing.
Expected results:
The rectangle should have been drawn with antialiasing.
This happens only with true rectangles. Adding anything else to the subpath, even a single moveTo call, will make it render as expected.
It also doesn't affect rectangles transformed through Path2D.addPath(path, matrix).
I noticed this by seeing 4 new failures in https://wpt.fyi/results/result/css/geometry/DOMMatrix2DInit-validate-fixup.html since Hardware Acceleration defaults to true on macOS (Bug 1773712).
Comment 2•3 years ago
|
||
Can repro on Windows also.
2022-11-21T12:46:21.549000: DEBUG : Found commit message:
Bug 1779681 - Mark WebGL framebuffer as initially valid in DrawTargetWebgl. r=aosmond,gfx-reviewers
mWebglValid gets initialized to false, but it will never get reset to true until the next
frame, causing us to render into Skia the first frame rather than accelerate. Therefor, we
should just initialize it to valid. Since it is cleared to zero initially, this is safe.
Differential Revision: https://phabricator.services.mozilla.com/D151896
2022-11-21T12:46:21.549000: DEBUG : Did not find a branch, checking all integration branches
2022-11-21T12:46:21.549000: INFO : The bisection is done.
2022-11-21T12:46:21.564000: INFO : Stopped
| Assignee | ||
Comment 3•3 years ago
•
|
||
This is a known limitation of the 'copy' composite operation.
| Assignee | ||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Set release status flags based on info from the regressing bug 1779681
(In reply to Lee Salzman [:lsalzman] from comment #3)
This is a known limitation of the 'copy' composite operation.
I don't think this bug is related to "copy". I attach a new test-case where the zooming is done on a separate canvas to avoid "copy".
| Assignee | ||
Comment 6•3 years ago
|
||
WebGL doesn't reliably implement line smoothing, so we can't rely on it, making it
useless canvas lines. Instead, just fall back to emulating it manually with paths.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Description
•