[Fontations] Add pixel comparisons for FreeType vs. Fontations
[1] introduced path comparison testing for Fontations vs. FreeType. This
change introduces pixel tests and diffing for Fontations
vs. FreeType. This is intended to guide visual inspection and judging
the quality of the rendering result of Fontations and Skia path
rendering vs. FreeType.
The test performs subpixel-positioned, antialiased drawing of first the
Fontations test sample on the left, followed by a FreeType sample,
followed by the pixel-by-pixel comparison, followed by a visualisation
where every differing pixel is marked in white.
The test is compatible with viewer commands for scaling up and down
using the UI. It takes into account the transformation matrix configured
on Canvas. For that to work with a pixel by pixel comparison, the final
pixel position on the Canvas is rounded to an integer position, so that
Fontations image and FreeType image match in positioning.
The tests in this CL also require access to the CIPD
googlefonts_testdata blob.
[1] https://skia-review.googlesource.com/c/skia/+/758001
Bug: skia:295807418
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Fontations,Build-Mac-Clang-x86_64-Debug-Fontations,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Fontations,Test-Mac12-Clang-MacBookPro16.2-CPU-AppleIntel-x86_64-Debug-All-Fontations,BazelTest-cpu_tests-tests-cpu_only_debug_rbe-linux_x64,BazelTest-gm-cpu_gms-cpu_only_debug_rbe-linux_x64,BazelTest-gm-hello_bazel_world_test-linux_rbe-linux_x64
Change-Id: I4da305caa61cb1765b54f7000a537013ed73b894
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/759476
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2 files changed