[scenario app] make image matching fuzzier. (flutter/engine#51376)

Attempt to work around the minor 1px differences from
https://github.com/flutter/flutter/issues/145058
This commit is contained in:
Jonah Williams
2024-03-13 09:50:50 -07:00
committed by GitHub
parent fd1b1e383b
commit 3b105855ac

View File

@@ -196,7 +196,8 @@ Future<void> _run({
}
if (isSkiaGoldClientAvailable) {
final Future<void> comparison = skiaGoldClient!
.addImg(fileName, goldenFile, screenshotSize: screenshot.pixelCount)
// Each color channel can be off by 2.
.addImg(fileName, goldenFile, screenshotSize: screenshot.pixelCount, pixelColorDelta: 8)
.catchError((Object error) {
logWarning('skia gold comparison failed: $error');
comparisonsFailed++;