[SVG] drop-shadow blur becomes solid when WebRender is on
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox75 | --- | fixed |
People
(Reporter: bugzilla, Assigned: cbrewster)
Details
Attachments
(7 files)
I was working with the attached SVG and noticed that its blur becomes solid when WebRender is enabled. The issue only exists when it uses drop-shadow; it renders fine when using other forms of SVG shadows instead. The issue was resolved by disabling WebRender.
I'll attach screenshots of how it rendered when I pasted the markup into SVGOMG.
| Reporter | ||
Comment 1•6 years ago
|
||
This is the way it should render, and how it does render when WebRender is disabled.
| Reporter | ||
Comment 2•6 years ago
|
||
Here it is with WR enabled.
Updated•6 years ago
|
Comment 3•6 years ago
|
||
I still get the drop shadow blur with webrender enabled (tested on macOS). So maybe it's something specific to your setup.
Can you paste your about:support?
| Reporter | ||
Comment 4•6 years ago
|
||
| Reporter | ||
Updated•6 years ago
|
| Assignee | ||
Comment 5•6 years ago
•
|
||
WebRender is not taking into account scale factors when determining the standard deviation for the blur when rendering the shadow for drop-shadows.
Blur: https://searchfox.org/mozilla-central/source/gfx/wr/webrender/src/picture.rs#3980
Drop Shadow: https://searchfox.org/mozilla-central/source/gfx/wr/webrender/src/picture.rs#4122
Comment 6•6 years ago
|
||
See also the examples on https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDropShadow, two of which appear to be affected by this.
| Assignee | ||
Comment 7•6 years ago
|
||
| Assignee | ||
Comment 8•6 years ago
|
||
WebRender expects drop shadow dx/dy to be in user space, which is a floating point value.
Before this, a dx/dy such as (0.2, 0.2) was truncated to (0, 0) resulting in no offset of the shadow.
Depends on D63441
| Assignee | ||
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Connor, this failed to land with the following error: applying /tmp/tmpbJJCpy 2 out of 2 hunks ignored -- saving rejects to file layout/svg/nsFilterInstance.cpp.rej abort: patch command failed: exited with status 256
| Assignee | ||
Comment 10•6 years ago
|
||
Not sure what happened there. I have rebased the commits onto the latest central.
Comment 11•6 years ago
|
||
Same thing: Details: applying /tmp/tmptoYfGg 2 out of 2 hunks ignored -- saving rejects to file layout/svg/nsFilterInstance.cpp.rej abort: patch command failed: exited with status 256
| Assignee | ||
Comment 12•6 years ago
|
||
Looks like my commit was conflicting with a reformat commit that was in autoland (https://hg.mozilla.org/mozilla-central/rev/06762c633bf6f4609c31add3b3a6df7c2ee5373e). I've rebased onto central which now has the reformat commit. This should be able to be applied cleanly now.
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Backed out for webrender wrench bustages
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=49e61b566da14b8e34e0efa332d9c7ff91625062&selectedJob=290314849
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=290314849&repo=autoland&lineNumber=18520
Backout: https://hg.mozilla.org/integration/autoland/rev/e9a85eb47d024d9defa5e0a0eaf17c6403eddf98
| Assignee | ||
Comment 15•6 years ago
|
||
This was causing one of the large drop-shadow wrench reftests to timeout.
This is only a partial fix, as we should be checking the scale factors earlier on when sanitizing the
filter input. This will ensure we match what the non-WR backend is doing and will prevent overinflation.
| Assignee | ||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
Tried to land latest changes but received:
"We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. applying /tmp/tmp_sGwPN gfx/wr/webrender/src/picture.rs Hunk #1 FAILED at 96. 1 out of 2 hunks FAILED -- saving rejects to file gfx/wr/webrender/src/picture.rs.rej abort: patch command failed: exited with status 256 "
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a9d8b62a3993
https://hg.mozilla.org/mozilla-central/rev/ce1593bf9d51
https://hg.mozilla.org/mozilla-central/rev/b7ab4c947688
Description
•