Closed Bug 1561775 Opened 5 years ago Closed 2 years ago

WebRender does not apply blur filters and transforms in the correct order

Categories

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

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: cbrewster, Unassigned)

References

Details

Attachments

(2 files)

Attached file testcase (deleted) —

WebRender applies blur filters after transforms are applied instead of before.

There was an attempt to fix this in Bug 1499113; however, it does not cover all cases.
The solution in that bug was to compute scale factors and adjust the x/y std deviation of the blur; however, this does not work if both a scale and rotate transform are applied.

Comment on attachment 9074398 [details] testcase ><style> > #box { > width: 200px; > height: 200px; > background-color: red; > filter: blur(20px); > transform: rotateZ(30deg) scaleX(0.1); >} ></style> ><div id="box">Box</div>
Attachment #9074398 - Attachment mime type: text/plain → text/html
Attached image testcase results (non-WR vs WR) (deleted) —

We can use raster roots in WebRender to apply filters before applying transforms. This would also remove the need for using scale_factors to adjust the x/y standard deviation of the blur.

We can add an additional check here to see if the picture has a filter applied:
https://searchfox.org/mozilla-central/rev/f91bd38732d4a330eba4e780812274b98eb81274/gfx/wr/webrender/src/picture.rs#2747

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

Attachment

General

Created:
Updated:
Size: