Skip to content
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

Sync changes from mozilla-central #3548

Merged
merged 6 commits into from Feb 12, 2019

Bug 1523495 - Adjust blur target sizes to avoid down-scaling artifact…

  • Loading branch information
nical authored and moz-gfx committed Feb 11, 2019
commit ae138adf2260e5e40bfb00034fa27ca647e8f91a
@@ -2914,10 +2914,17 @@ impl PicturePrimitive {
// blur results, inflate that clipped area by the blur range, and
// then intersect with the total screen rect, to minimize the
// allocation size.
let device_rect = clipped
let mut device_rect = clipped
.inflate(inflation_factor, inflation_factor)
.intersection(&unclipped.to_i32())
.unwrap();
// Adjust the size to avoid introducing sampling errors during the down-scaling passes.
// what would be even better is to rasterize the picture at the down-scaled size
// directly.
device_rect.size = RenderTask::adjusted_blur_source_size(
device_rect.size,
blur_std_deviation,
);

let uv_rect_kind = calculate_uv_rect_kind(
&pic_rect,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.