Skip to content

[impeller] create automated test for catching blur shimmering #152195

@gaaclarke

Description

@gaaclarke

On multiple occasions that we've edited the blur code that passes golden tests but when using the blur we find that there is shimmering when animating aspects of the blur (example: flutter/engine#53760 (comment)). "Shimmering" here is defined as large differences in the blurred content for the same input pixels considering small changes to the blurs other parameters.

Examples from the past:

  1. Slowly sweeping the sigma value
  2. Moving the clip rect around for a backdrop filter

These regressions are bad enough to merit reverting PRs so we should have an automated test that will block them to avoid having to be reverted later.

I propose the automated test will sweep through all the values of sigma and perform a RMSE comparison between the outputs of different values of sigma.

let mut left : Image = CalculateBlur(sigma: 0.0)
for sigma in range(0.1, 700, step: 0.1) {
  let right : Image = CalculateBlur(sigma: sigma);
  let error : f64 = RMSE(left, right);
  expect(error < MAX_ALLOWED_ERROR);
  left = right;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions