Closed Bug 1352654 Opened 4 years ago Closed 4 years ago

Enable building gradient display items for nsDisplayBackgroundImage by default


(Core :: Graphics: WebRender, enhancement)

Not set



Tracking Status
firefox56 --- unaffected
firefox57 --- unaffected


(Reporter: rhunt, Unassigned)



(Whiteboard: [gfx-noted])

This is just a tracking bug for the work to enable gradient display item building from nsDisplayBackgroundImage by default. This is just about gradients, other work will be done for images (bug 1351242).
Here is a try run with the pref and some more recent patches affecting gradients,

Another try run based off the previous,

There are about 40-50 reftest failures to look into. They mostly seem to be gradient tests so that is nice.
I should also note, with the pref enabled I am noticing some rendering artifacts on the chrome of the browser that I am looking into.
A lot of the failures were due to dithering one gradient and not the other. I've updated the try run with dithering disabled.

It seems like there are new failures that sneak in.
Depends on: 1355570

The remaining failures:
1. border gradient tests - differences between WR path and non WR border path (~33 tests)
2. wrong positioning of bounds in nsCSSRenderingGradients (~2 tests) - have fix for this
3. background-blend-mode tests (~2 tests) - triaging this one still
4. linear gradient tests (~5 tests) - differences between WR path and canvas path
5. radial shape tests (~6 tests) - problems with -moz-transforms in reference html
6. zero length radial gradient tests (~10 tests) - have a fix for this
7. two stop tests (~2 tests) - have a fix for this

When border gradients are using WebRender, 1. should be fixed, until then it might need fuzzing. 4 is more difficult because of the canvas path. For both of them, I think the differences between the gradients should be investigated. We might be able to improve the accuracy and not need fuzzing or as much.
The latest try run with some PR's cherry picked from upstream webrender. I only see the rotated test and some problems with display item transforms as remaining. The rest are fuzziness issues.

I also kicked off a bunch of try runs with different attempts to increase accuracy through two different ways,

1. Increase the GradientData table size - doesn't seem to have a strong effect, but noticeable when the table size reaches 1024, one test resolves itself. I don't think that increasing the table size to 1024 is worth it for just that

2. Change the lerp used in filling the GradientData table size - doesn't seem to have a noticeable effect
Priority: P3 → P1
Whiteboard: [gfx-noted] → [wr-mvp] [gfx-noted]
Target Milestone: --- → mozilla57
I'm not actively working on this.
Assignee: rhunt → nobody
Priority: P1 → P2
Target Milestone: mozilla57 → ---
Hello Ryan, do you have any WIP for this bug?
Flags: needinfo?(rhunt)
Hi Kevin, no any code I had for webrender gradients is checked in to central. I also don't know much about what needs to be done still because a lot has changed since I worked on this.
Flags: needinfo?(rhunt)
I think we've enable nsDisplayBackgroundImage in Bug 1359242.
Some fuzzy conditions for gradient reftest are added in that bug, but the errors are minor and I think we do need to fix it right now; therefore, I would close this bug.
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1359242
Priority: P2 → --
Whiteboard: [wr-mvp] [gfx-noted] → [gfx-noted]
You need to log in before you can comment on or make changes to this bug.