summaryrefslogtreecommitdiff
path: root/tools/sim_screenshot.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sim_screenshot.py')
-rw-r--r--tools/sim_screenshot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/sim_screenshot.py b/tools/sim_screenshot.py
index 81b41b6..5517b78 100644
--- a/tools/sim_screenshot.py
+++ b/tools/sim_screenshot.py
@@ -16,7 +16,8 @@ Steps:
black out the corners of round displays, which show bezel, not screen.
3. Fail if the screen is blank (the app drew nothing).
4. With --golden, compare with the approved image: the check fails when more
- than 0.5 % of the pixels differ by more than 24 levels in any channel. A
+ than 0.01 % of the pixels differ by more than 24 levels in any channel (less
+ than one changed character; rendering is deterministic). A
diff image (differences in red) is written next to --out.
5. With --approve, save the screen as the new golden image instead.
@@ -40,7 +41,7 @@ MAX_OFFSET_X, MAX_OFFSET_Y = 16, 64 # search range for the device drawing
MIN_OVERLAP = 0.9 # the window may clip the drawing's edge, but not more than this
MAX_BEZEL_DIFF = 6.0 # mean absolute difference per channel at the best offset
PIXEL_TOLERANCE = 24 # per-channel difference that still counts as equal
-MAX_DIFF_FRACTION = 0.005 # share of pixels allowed to differ
+MAX_DIFF_FRACTION = 0.0001 # share of pixels allowed to differ: below one changed character
MIN_SCREEN_STDDEV = 2.0 # below this the screen counts as blank