summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Keller <skeller@gnome.org>2022-04-04 22:55:16 +0200
committerMatthias Clasen <mclasen@redhat.com>2022-04-21 19:23:13 -0400
commitd56276f6d61cd87b1a41092f46b240c238e4c6ca (patch)
treeaf51365446ef91595cdeb5c87730bb720e975b8a
parentf1d44635bdec5475987bda7f8dec8a1febde3953 (diff)
downloadgtk+-d56276f6d61cd87b1a41092f46b240c238e4c6ca.tar.gz
testsuite: Add unaligned-offscreen test
Tests whether text rendered to an offscreen node unaligned with the pixel grid introduces blurriness.
-rw-r--r--testsuite/gsk/compare/unaligned-offscreen.node23
-rw-r--r--testsuite/gsk/compare/unaligned-offscreen.pngbin0 -> 412 bytes
-rw-r--r--testsuite/gsk/meson.build1
3 files changed, 24 insertions, 0 deletions
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 0000000000..bb624f1ae5
--- /dev/null
+++ b/testsuite/gsk/compare/unaligned-offscreen.png
Binary files differ
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
]