Closed Bug 1589198 Opened 5 years ago Closed 5 years ago

backdrop-filter causes blurring due to incorrect pixel snapping

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: cbrewster, Assigned: aosmond)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files, 1 obsolete file)

Continuing from https://bugzilla.mozilla.org/show_bug.cgi?id=1178765#c82

According to Bx, in Firefox 71, backdrop-filter is applying the filter effect to other elements than just the backdrop.

Test case: https://jsfiddle.net/ziom1/kjw2690e/

I cannot reproduce this behavior, Bx can you provide a screenshot and the platform you are using?

Bx, see comment 0.

Flags: needinfo?(the.bull)

I'm not a Bx, but I can provide a screenshot.

https://sun9-15.userapi.com/c851236/v851236476/1e6d3e/ZgZlKqrlv_s.jpg

Windows 10 1903 (build 18362.418, latest updates). FF 71.0b1 (Developer Edition)

DxDiag if needed: https://dk4000.pro/DxDiag.txt

Attached image firefox_blurred.png

"backdrop-filter: blur(10px)" only on dark rectangles, but as you can see "Some text" and buttons are also blurred. Dashed squares are over backdrop-filter layer and two (top left and top right) are also blurred.

Attached image firefox_notblurred.png

"backdrop-filter: blur(10px)" turned off due to changing "transform" property of the lowest layer (pink background element). "Some text", buttons and dashed squares are perfectly sharp now.

Attached image chrome_screen.png

Chrome behavior example.

Attached image edge_screen.png (obsolete) —

Microsoft Edge screen example.

Flags: needinfo?(the.bull)
Attached image edge_screen.png
Attachment #9101683 - Attachment is obsolete: true

Windows 10 v. 1903 (build 18362.418). Firefox Developer Edition 71.0b1 (64 bits). 16 GB RAM, powerful GPU.
Before Firefox 71.0 everything was good (sharp and valid behavior).

I now see the issue. The backdrop-filter is not being applied to everything. The blur to everything is happening due to incorrect pixel snapping, if you resize the iframe in the testcase you can see the issue with the snapping.

This looks similar to the issue I fixed in bug 1573914. The test case there has also regressed https://codepen.io/cgbrewster/pen/OJLyjGp

Summary: backdrop-filter is applied to other elements other than the backdrop → backdrop-filter causes blurring due to incorrect pixel snapping

I can't see the backdrop effect at all on either testcase here on mac, I've confirmed that webrender is enabled. I've tried nightlies from shortly after the backdrop support landed and the bug fix mentioned landed, I've tried recent nightlies, I've tried in between nightlies. Is this expected or a bug that should also be filed?

(In reply to Connor Brewster [:cbrewster] from comment #9)

I now see the issue. The backdrop-filter is not being applied to everything. The blur to everything is happening due to incorrect pixel snapping, if you resize the iframe in the testcase you can see the issue with the snapping.

This looks similar to the issue I fixed in bug 1573914. The test case there has also regressed https://codepen.io/cgbrewster/pen/OJLyjGp

Andrew landed a bug change to pixel snapping recently, so perhaps it is that?

Flags: needinfo?(connorbrewster)

(In reply to Timothy Nikkel (:tnikkel) from comment #10)

I can't see the backdrop effect at all on either testcase here on mac, I've confirmed that webrender is enabled. I've tried nightlies from shortly after the backdrop support landed and the bug fix mentioned landed, I've tried recent nightlies, I've tried in between nightlies. Is this expected or a bug that should also be filed?

Did you make sure layout.css.backdrop-filter.enabled is also enabled?

Flags: needinfo?(connorbrewster)

(In reply to Connor Brewster [:cbrewster] from comment #11)

Did you make sure layout.css.backdrop-filter.enabled is also enabled?

Ah, I did not know it was behind a pref, thanks.

Looks like I made it inconsistently calculate the estimated and precise local rects for a picture during frame building. I would think this would affect more than just backdrop filters.....

Flags: needinfo?(aosmond)
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3a7133456b4 Snap the picture's precise local rect the same as the estimated local rect. r=kvark
Backout by dvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/981d7988a279 Backed out changeset a3a7133456b4 for reftest at layout/reftests/svg/filters/filter-nested-filtering-02.svg. On a CLOSED TREE
Flags: needinfo?(aosmond)
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d411c02c12ff Snap the picture's precise local rect the same as the estimated local rect. r=kvark
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Flags: in-testsuite+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: