Commit 46bdf27f authored by Adam Kallai's avatar Adam Kallai Committed by Commit Bot

Add tolerance thresholds for four cc/trees tests

Affected tests are RotatedFilter, RotatedShadowFitler from
LayerTreeHostFilterPixelTest and RotatedClippedCircle,
RotatedClippedCircleUnderflow from LayerTreeHostMaskAsBlendingPixelTest.

These tests show some pixels difference on Windows on ARM64.

Bug: 1029728, 1029729, 1030244
Change-Id: I738749370c5bcae71fe2bd530872ee2af3633c27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947728Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Reviewed-by: default avatarSaman Sami <samans@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722467}
parent 8076d148
......@@ -843,11 +843,18 @@ TEST_P(LayerTreeHostFiltersPixelTest, RotatedFilter) {
background->AddChild(child);
#if defined(OS_WIN)
#if defined (ARCH_CPU_ARM64)
// Windows ARM64 has some pixels difference: crbug.com/1029728
float percentage_pixels_large_error = 0.391112f;
float average_error_allowed_in_bad_pixels = 1.1f;
int large_error_allowed = 3;
#else
// Windows has 1 pixel off by 1: crbug.com/259915
float percentage_pixels_large_error = 0.00111112f; // 1px / (300*300)
float percentage_pixels_small_error = 0.0f;
float average_error_allowed_in_bad_pixels = 1.f;
int large_error_allowed = 1;
#endif
float percentage_pixels_small_error = 0.0f;
int small_error_allowed = 0;
pixel_comparator_.reset(new FuzzyPixelComparator(
true, // discard_alpha
......@@ -889,11 +896,18 @@ TEST_P(LayerTreeHostFiltersPixelTest, RotatedDropShadowFilter) {
background->AddChild(child);
#if defined(OS_WIN) || defined(ARCH_CPU_ARM64)
#if defined(OS_WIN) && defined(ARCH_CPU_ARM64)
// Windows ARM64 has some pixels difference: crbug.com/1029729
float percentage_pixels_large_error = 0.89f;
float average_error_allowed_in_bad_pixels = 5.f;
int large_error_allowed = 17;
#else
// Windows and ARM64 have 3 pixels off by 1: crbug.com/259915
float percentage_pixels_large_error = 0.00333334f; // 3px / (300*300)
float percentage_pixels_small_error = 0.0f;
float average_error_allowed_in_bad_pixels = 1.f;
int large_error_allowed = 1;
#endif
float percentage_pixels_small_error = 0.0f;
int small_error_allowed = 0;
pixel_comparator_.reset(new FuzzyPixelComparator(
true, // discard_alpha
......
......@@ -704,11 +704,20 @@ class LayerTreeHostMaskAsBlendingPixelTest
small_error_allowed = 1;
} else {
#if defined(ARCH_CPU_ARM64)
#if defined(OS_WIN)
// Windows ARM64 has some pixels difference
// Affected tests: RotatedClippedCircle, RotatedClippedCircleUnderflow
// crbug.com/1030244
percentage_pixels_error = 6.1f;
average_error_allowed_in_bad_pixels = 5.f;
large_error_allowed = 20;
#else
// Differences in floating point calculation on ARM means a small
// percentage of pixels will be off by 1.
percentage_pixels_error = 0.112f;
average_error_allowed_in_bad_pixels = 1.f;
large_error_allowed = 1;
#endif
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment