From 1c733857b3fc078f6fa8491eb6880536925251e0 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Mon, 4 Apr 2022 22:55:16 +0200 Subject: [PATCH] testsuite: Add unaligned-offscreen test Tests whether text rendered to an offscreen node unaligned with the pixel grid introduces blurriness. --- .../gsk/compare/unaligned-offscreen.node | 23 ++++++++++++++++++ testsuite/gsk/compare/unaligned-offscreen.png | Bin 0 -> 412 bytes testsuite/gsk/meson.build | 1 + 3 files changed, 24 insertions(+) create mode 100644 testsuite/gsk/compare/unaligned-offscreen.node create mode 100644 testsuite/gsk/compare/unaligned-offscreen.png diff --git a/testsuite/gsk/compare/unaligned-offscreen.node b/testsuite/gsk/compare/unaligned-offscreen.node new file mode 100644 index 0000000000..c116928fa8 --- /dev/null +++ b/testsuite/gsk/compare/unaligned-offscreen.node @@ -0,0 +1,23 @@ +blend { + mode: normal; + top: transform { + child: blend { + top: text { + color: rgb(0, 0, 0); + font: "Cantarell Bold 11"; + glyphs: "|||||||||||||||||||||||"; + } + bottom: text { + color: rgb(0, 0, 0); + font: "Cantarell Bold 11"; + glyphs: "==========="; + offset: 0 13; + } + } + transform: translate(1.5, 15.5); + } + bottom: color { + color: red; + bounds: 0 0 100 30; + } +} diff --git a/testsuite/gsk/compare/unaligned-offscreen.png b/testsuite/gsk/compare/unaligned-offscreen.png new file mode 100644 index 0000000000000000000000000000000000000000..bb624f1ae5d4c306ab5ea84bb3ac2f97fe2174a7 GIT binary patch literal 412 zcmeAS@N?(olHy`uVBq!ia0vp^DL^d8!3HF6MeqL1z`&U7>EalY(fD@eUN2@xk=Fe` zm>Dm6sZ0%Pn(DGafLmHx{=lK*9uJw9aQ}wwJ-UlUML?TgS#*t$GKn3%J)X?>?Y^f!VI{ zunSKCKTpGE3H}E51o<0YSLQ66xXN<%u|?~ueHsK5zPO*Yy>p~O;&Hc+jKUU06YoOx zXEy0sewRJ2&IwHpydKL_zv;*Z#iSbohB+M)W-dI^N^M|^5}gskyz?cp9-6!KY<={M z^~X6CSw`yv${(hmv}E7caQ)05xq<-abmodvXY!erA2>egrBA?{!|_M|{=D+y_?$4; za{`BAkJc<-b}ss8jrFw%v$>xn_A5^Bk?{|-+0RyIWa;~0M#Y~Q50)%DSLWIqwnuNa zpQL%I;T>m|614*Unfv>yJ7)MveitzOldJ)B*kk!8?EjS~pS^t=80rk3u6{1-oD!M< Dq8P2W literal 0 HcmV?d00001 diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 106661a708..2fb02087d3 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -83,6 +83,7 @@ compare_render_tests = [ 'repeat-texture', 'transform-in-transform', 'transform-in-transform-in-transform', + 'unaligned-offscreen', 'rounded-clip-in-clip-3d', # not really 3d, but cairo fails it ]