Changeset 287345 in webkit
- Timestamp:
- Dec 21, 2021, 9:15:33 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/harness/image-diff/hidpi-pixel-tolerance-expected.html (added)
-
LayoutTests/fast/harness/image-diff/hidpi-pixel-tolerance.html (added)
-
LayoutTests/platform/ios-wk2/TestExpectations (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/ImageDiff/ImageDiff.cpp (modified) (1 diff)
-
Tools/ImageDiff/PlatformImage.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287329 r287345 1 2021-12-21 Simon Fraser <simon.fraser@apple.com> 2 3 Fuzzy pixel data need to be computed in terms of CSS pixels 4 https://bugs.webkit.org/show_bug.cgi?id=232525 5 6 Reviewed by Tim Horton. 7 8 Add a hidpi pixel tolerance test. 9 10 * fast/harness/image-diff/hidpi-pixel-tolerance-expected.html: Added. 11 * fast/harness/image-diff/hidpi-pixel-tolerance.html: Added. 12 * platform/ios-wk2/TestExpectations: Remove fast/harness/image-diff/fuzz-2-25.html. 13 1 14 2021-12-21 Alan Bujtas <zalan@apple.com> 2 15 -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r287323 r287345 1112 1112 1113 1113 webkit.org/b/157589 fast/text-autosizing/ios/text-autosizing-after-back.html [ Pass Timeout ] 1114 1115 webkit.org/b/232525 fast/harness/image-diff/fuzz-2-25.html [ ImageOnlyFailure ]1116 1114 1117 1115 # started to fail after new snapshotting in r202532 -
trunk/Tools/ChangeLog
r287343 r287345 1 2021-12-21 Simon Fraser <simon.fraser@apple.com> 2 3 Fuzzy pixel data need to be computed in terms of CSS pixels 4 https://bugs.webkit.org/show_bug.cgi?id=232525 5 6 Reviewed by Tim Horton. 7 8 Pixel tolerance is computed in CSS pixels, so have ImageDiff divide the total number of 9 differing pixels by the square of the scale factor (a single different pixel at 1x becomes 4 10 different pixels at 2x). 11 12 * ImageDiff/ImageDiff.cpp: 13 (processImages): 14 * ImageDiff/PlatformImage.cpp: 15 (ImageDiff::PlatformImage::isCompatible const): 16 (ImageDiff::PlatformImage::difference): 17 1 18 2021-12-21 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Tools/ImageDiff/ImageDiff.cpp
r286285 r287345 59 59 fprintf(stderr, "Error: test and reference images differ in alpha. Test image %s alpha, reference image %s alpha.\n", 60 60 actualImage->hasAlpha() ? "has" : "does not have", baselineImage->hasAlpha() ? "has" : "does not have"); 61 } else if (actualImage->scaleFactor() != baselineImage->scaleFactor()) { 62 fprintf(stderr, "Error: test and reference images differ in scale factor. Test image scale factor %.1f, reference image scale factor %.1f.\n", 63 actualImage->scaleFactor(), baselineImage->scaleFactor()); 61 64 } 62 65 -
trunk/Tools/ImageDiff/PlatformImage.cpp
r285109 r287345 37 37 return width() == other.width() 38 38 && height() == other.height() 39 && scaleFactor() == other.scaleFactor() 39 40 && rowBytes() == other.rowBytes() 40 41 && hasAlpha() == other.hasAlpha(); … … 106 107 } 107 108 109 // totalPixels is "CSS pixels" or "points". 110 difference.totalPixels /= (scaleFactor() * scaleFactor()); 111 108 112 return PlatformImage::createFromDiffData(diffBuffer, width, height); 109 113 }
Note:
See TracChangeset
for help on using the changeset viewer.