[gtk: 2/3] testsuite: Add unaligned-offscreen test




commit 1c733857b3fc078f6fa8491eb6880536925251e0
Author: Sebastian Keller <skeller gnome org>
Date:   Mon Apr 4 22:55:16 2022 +0200

    testsuite: Add unaligned-offscreen test
    
    Tests whether text rendered to an offscreen node unaligned with the
    pixel grid introduces blurriness.

 testsuite/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(+)
---
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
Binary files /dev/null and b/testsuite/gsk/compare/unaligned-offscreen.png 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
 ]
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]