Closed Bug 1616255 Opened 4 years ago Closed 4 years ago

Handle normalized conic-gradient color stop positions in WebRender

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: ntim, Assigned: ntim)

References

Details

Attachments

(1 file)

conic-gradient(green -50%, blue -50%)
conic-gradient(blue 0, blue 100%)

should render the same, but they currently don't.

Summary: Fix stop normalization in WebRender → Fix conic-gradient stop normalization in WebRender

Does this bug cover all normalization issues? Because conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg) is currently computed to conic-gradient(at 50% 50%, rgb(154, 205, 50) 40%, rgb(255, 215, 0) 0deg, rgb(255, 215, 0) 75%, rgb(255, 0, 102) 0deg) and renders completely gold. The expected result can be seen at https://drafts.csswg.org/css-images-4/#example-7e5c09d0.

Sebastian

Flags: needinfo?(ntim.bugs)

(In reply to Sebastian Zartner [:sebo] from comment #1)

Because conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg) is currently computed to conic-gradient(at 50% 50%, rgb(154, 205, 50) 40%, rgb(255, 215, 0) 0deg, rgb(255, 215, 0) 75%, rgb(255, 0, 102) 0deg)

That's currently expected, and correct as well. Though serializing to an even shorter form is something I can consider as follow up work.

renders completely gold. The expected result can be seen at https://drafts.csswg.org/css-images-4/#example-7e5c09d0.

Yeah, there's a bunch of broken examples on https://leaverou.github.io/conic-gradient/ too. WebRender and Skia (used on macOS/Linux when WR is disabled) have different sets of issues though.

Does this bug cover all normalization issues?

Not sure, since I haven't started working on the fix yet. I'll file new bugs as needed.

Flags: needinfo?(ntim.bugs)

(In reply to Tim Nguyen :ntim from comment #2)

(In reply to Sebastian Zartner [:sebo] from comment #1)

Because conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg) is currently computed to conic-gradient(at 50% 50%, rgb(154, 205, 50) 40%, rgb(255, 215, 0) 0deg, rgb(255, 215, 0) 75%, rgb(255, 0, 102) 0deg)

That's currently expected, and correct as well. Though serializing to an even shorter form is something I can consider as follow up work.

I didn't realize you already answered. :-) I've filed bug 1618997 for improving the serialization in the meantime.

renders completely gold. The expected result can be seen at https://drafts.csswg.org/css-images-4/#example-7e5c09d0.

Yeah, there's a bunch of broken examples on https://leaverou.github.io/conic-gradient/ too. WebRender and Skia (used on macOS/Linux when WR is disabled) have different sets of issues though.

Does this bug cover all normalization issues?

Not sure, since I haven't started working on the fix yet. I'll file new bugs as needed.

I see. Thank you for the quick response!

Sebastian

The priority flag is not set for this bug.
:jbonisteel, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jbonisteel)
Flags: needinfo?(jbonisteel)
Priority: -- → P3
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/010e79848390
Handle start and end offsets in conic-gradient WR shader. r=gw
Summary: Fix conic-gradient stop normalization in WebRender → Handle normalized conic-gradient color stop positions in WebRender
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: