-
Notifications
You must be signed in to change notification settings - Fork 297
Tweak blur filter so the result is close to gecko. #1920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Nice work! There is a CI failure in the shader validation - you can test this locally by running We should also do a gecko try run with this to see what effect it has on all the existing tests. |
85dd6b7
to
8a92e5f
Compare
Thanks. I have fixed the shader validation. gecko try is here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9311537999c72f68f92dc4912ce9f576776a5abf&selectedJob=139079239 Only fuzzy changes required I think. |
Travis seems OK:
Taskcluster is showing one of the reftest failures: https://tools.taskcluster.net/groups/EtuwFR_uQd-l9S7d7QDiow/tasks/EtuwFR_uQd-l9S7d7QDiow/runs/0/logs/public%2Flogs%2Flive.log#L1152 Also, I suppose this fixes #1827 |
@mephisto41 For some reason, the TaskCluster CI often seems to require slightly more fuzziness than the Travis CI. It might just be a case of looking at the TC logs and updating the fuzziness on that one wrench test that is failing. |
@mephisto41 It does look like quite a lot of unexpected fails on the try run - could you detail the ones that have changed and what the differences are? |
8a92e5f
to
d56edf5
Compare
Yap, we have R3, R4 and R7 reftests failure. R3 has some box-shadow tests, R4 has both box-shadow and css blur filter tests and R7 has css blur filter tests. We only need change the fuzzy value for those tests since we change the blur shader. |
Most of them do appear to be fairly small differences. There's one (maybe in R7?) where one of the reftests has no blur but the reference has a blur. I think this is probably OK to merge, if it makes the blur look closer to Gecko (I haven't checked that myself). But I'd like to get opinion from @staktrace first on whether those failures are reasonable to fuzz (for now). |
Ah, I saw it. it is in R4 (mix-blend-mode-and-filter.html). I'll check it again to see if it is regressed by this patch. Thanks for reminder. |
☔ The latest upstream changes (presumably #1923) made this pull request unmergeable. Please resolve the merge conflicts. |
d56edf5
to
3fa3c2b
Compare
mix-blend-mode-and-filter.html is regressed by gecko bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1370564). Not this bug, I think this bug is ready to go. I'll create a gecko bug for fixing mix-blend-mode-and-filter.html. |
Yeah it looked like the only non-fuzzy change here was mix-blend-mode-and-filter.html which already got annotated in m-c via bug 1370564. The rest of these changes look fine to me. |
@staktrace @mephisto41 OK, thanks! @bors-servo r+ |
📌 Commit 3fa3c2b has been approved by |
Tweak blur filter so the result is close to gecko. We actually pass the std deviation into cs_blur shader for gaussian blur. So, correct some naming which causing confusion. Also, according to the spec, the std deviation of box and text shadow is half of blur radius. Here are some gecko try for comparison. [With this patch](https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/TTHMc9DqR-m6i0qnZo5oCw/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1) [Without this patch](https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/JureAaHrT2qty-tYG0BOHg/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1) r? @glennw <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1920) <!-- Reviewable:end -->
💔 Test failed - status-appveyor |
@mephisto41 Looks like this has compile errors as a result of some other PRs that landed in the meantime, so will need to be updated, sorry! |
We actually pass the std deviation into cs_blur shader for gaussian blur. So, correct some naming which causing confusion. Also, according to the spec, the std deviation of box and text shadow is half of blur radius.
3fa3c2b
to
e1f0c80
Compare
I've updated the changesets. |
@@ -1861,10 +1862,12 @@ impl FrameBuilder { | |||
match *filter { | |||
FilterOp::Blur(blur_radius) => { | |||
let blur_radius = device_length(blur_radius, device_pixel_ratio); | |||
let blur_std_deviation = blur_radius.0 as f32; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right - the std deviation shouldn't be the same as the blur radius?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is confusing. But for css blur filter, the blur radius is the std deviation. See the spec https://drafts.fxtf.org/filter-effects/#FilterProperty
"Applies a Gaussian blur to the input image. The passed parameter (the radius) defines the value of the standard deviation to the Gaussian function."
Ah, right. Thanks! @bors-servo r+ |
📌 Commit e1f0c80 has been approved by |
Tweak blur filter so the result is close to gecko. We actually pass the std deviation into cs_blur shader for gaussian blur. So, correct some naming which causing confusion. Also, according to the spec, the std deviation of box and text shadow is half of blur radius. Here are some gecko try for comparison. [With this patch](https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/TTHMc9DqR-m6i0qnZo5oCw/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1) [Without this patch](https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/JureAaHrT2qty-tYG0BOHg/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1) r? @glennw <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1920) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-travis |
We actually pass the std deviation into cs_blur shader for gaussian
blur. So, correct some naming which causing confusion. Also, according
to the spec, the std deviation of box and text shadow is half of blur
radius.
Here are some gecko try for comparison.
With this patch
Without this patch
r? @glennw
This change is