From 3b105855ac4dc6353cc44c1049480c07dd76e9a1 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 13 Mar 2024 09:50:50 -0700 Subject: [PATCH] [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 --- .../flutter/testing/scenario_app/bin/run_android_tests.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart b/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart index d31132fc12..e253f85565 100644 --- a/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart +++ b/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart @@ -196,7 +196,8 @@ Future _run({ } if (isSkiaGoldClientAvailable) { final Future 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++;