Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTweak blur filter so the result is close to gecko. #1920
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. |
|
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? |
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. |
|
|
|
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+ |
|
|
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 -->
|
|
|
@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.
|
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; | |||
This comment has been minimized.
This comment has been minimized.
glennw
Oct 26, 2017
Member
This doesn't seem right - the std deviation shouldn't be the same as the blur radius?
This comment has been minimized.
This comment has been minimized.
mephisto41
Oct 26, 2017
Author
Contributor
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+ |
|
|
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 -->
|
|
mephisto41 commentedOct 24, 2017
•
edited by larsbergstrom
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