Closed Bug 1625917 Opened 4 years ago Closed 2 months ago

CSS conic-gradient the edges are blurred

Categories

(Core :: Graphics, defect, P3)

76 Branch
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: jieorlin, Unassigned)

References

()

Details

(Keywords: parity-safari)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36

Steps to reproduce:

Open:
data:text/html;charset=UTF-8,<style>html{background: repeating-conic-gradient(at left, black 0 2%, white 0 4%); min-height: 100%}</style>

Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=709330

Expected results:

No sawteeth, as smooth as SVG rendering.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Component: CSS Parsing and Computation → Graphics
Ever confirmed: true

Thanks for reporting! Since the bug report seems to be filed from macOS and Chromium is affected as well, I assume this was reported for Skia.

The current implementation uses SkGradientShader::MakeSweep method of the Skia library:
https://searchfox.org/mozilla-central/rev/7fba7adfcd695343236de0c12e8d384c9b7cd237/gfx/2d/DrawTargetSkia.cpp#531

similar to what Chromium does:
https://github.com/chromium/chromium/blob/c20d681c9c067c4e15bb1408f17114b9e8cba294/third_party/blink/renderer/platform/graphics/gradient.cc#L327

This needs to be fixed upstream.

I haven't checked if this affects WebRender though.

It seems like the Chromium bug has been closed even though I see the same blurry rendering on Chromium.

Keywords: parity-safari

Chrome has not been fixed yet. see also: https://bugs.chromium.org/p/skia/issues/detail?id=6470

(In reply to jieorlin from comment #4)

Chrome has not been fixed yet. see also: https://bugs.chromium.org/p/skia/issues/detail?id=6470

Thanks for finding the bug report!

Looks like this will be solved once Skia fixes it and we update the skia dependency.

Priority: -- → P3

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

Nowadays, we have the opposite issue: webrender does not anti-alias hard gradient stops so they are pixelated. We don't use skia to render css gradients anymore except in a few rare exceptions so I'll close this.

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.