Previously cc::FuzzyPixelComparator had overrall error parameters and
tiny error parameters. For example, the following set of parameters
error_pixels_percentage_limit: 3
small_error_pixel_percentage_limit: 2
max_abs_error_limit: 100
small_error_threshold: 2
allowed 3% of pixels to have diff<=100, and all of them can be >2.
There was no way to allow 2% small error pixels and only 1% of large
error pixels. The parameters actually applied stricter rule on small
errors than large errors.
Now add multiple methods to set parameters of FuzzyPixelComparator
instead of the original constructor with many parameters. The
error_pixels_percentage_limit parameter is changed to
large_error_pixels_percentage_limit to check for large errors
separately. The values of the parameter at callsites (only 2) where
small_error_pixel_percentage_limit was zero are adjusted accordingly.
check_critical_errors of FuzzyPixelComparator is removed and critical
errors are always checked.
discard_alpha parameter of all PixelComparator implementations is
removed and is replaced with dedicated method and classes.
Change-Id: Ic2be2882e432383a55f972f80f8e1c09fdde017c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4185898
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Owners-Override: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1096498}