Blurred translucent Canvas2D strokes disappear with accelerated rendering.
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: python273, Assigned: python273)
Details
Attachments
(1 file, 1 external file)
Steps to reproduce
- Open the attached
minimal-repro.htmlwith hardware-accelerated Canvas2D enabled. - Observe the canvas and the painted-pixel count printed below it.
Reproduces on Linux/X11 with Firefox 159.0a1 (revision 953be279951f07690621f6086ec11458249763c6, fresh profile) and on macOS with Firefox 157.
Tested user agents:
- Linux:
Mozilla/5.0 (X11; Linux x86_64; rv:159.0) Gecko/20100101 Firefox/159.0 - macOS:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:157.0) Gecko/20100101 Firefox/157.0
Actual results
The dot is missing: blank canvas, 0 painted pixels, center alpha 0.
Relevant logs or errors
GDB captured the internal WebGL rejection:
WebGL warning: drawArraysInstanced: Texture level 0 would be read by TEXTURE_2D unit 0, but written by framebuffer attachment COLOR_ATTACHMENT0, which would be illegal feedback.
Conditions and workarounds
The dot appears with globalAlpha=1, no blur, or { willReadFrequently: true }. These settings also avoid the failure: gfx.canvas.accelerated=false, gfx.canvas.accelerated.aa-stroke.enabled=false, or gfx.canvas.accelerated.shared-page-size=0.
Diagnosis
Confirmed texture feedback: the A8 stroke mask and filter-input target share a backing texture. Sampling it while rendering into it is illegal, even for distinct atlas rectangles. The accelerated path reports success despite the rejected draw. Cached masks also alias.
Expected results
A blurred, partially transparent black dot should be visible near the bottom right; painted pixels should be nonzero.
| Assignee | ||
Comment 1•1 month ago
|
||
Allocate new stroke masks away from the current render target's backing
texture while preserving shared-page allocation. Reject aliased surface
draws so cached masks use the existing fallback instead of silently
losing the filtered stroke.
Add GPU regression coverage for fresh and primed masks, alpha, colors,
positions, and HTML/OffscreenCanvas contexts.
Updated•1 month ago
|
Comment 2•1 month ago
|
||
The severity field is not set for this bug.
:lsalzman, could you have a look please?
For more information, please visit BugBot documentation.
Updated•29 days ago
|
Comment 4•14 days ago
|
||
| bugherder | ||
Description
•