testsuite: Add clip-translate-offscreen test
authorBenjamin Otte <otte@redhat.com>
Wed, 10 May 2023 19:56:53 +0000 (21:56 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 16 May 2023 16:53:27 +0000 (18:53 +0200)
This was an experiment where an offscreen was translated inside an
existing clip.

Because renderers try to limit offscreens to the clip rect, this is
interesting, because they might get the translation wrong.

testsuite/gsk/compare/clip-translate-offscreen.node [new file with mode: 0644]
testsuite/gsk/compare/clip-translate-offscreen.png [new file with mode: 0644]
testsuite/gsk/meson.build

diff --git a/testsuite/gsk/compare/clip-translate-offscreen.node b/testsuite/gsk/compare/clip-translate-offscreen.node
new file mode 100644 (file)
index 0000000..b5313e3
--- /dev/null
@@ -0,0 +1,17 @@
+color {
+  bounds: 0 0 50 50;
+  color: rgb(0,0,0);
+}
+clip {
+  clip: 10 10 30 30;
+  child: transform {
+    transform: translate(10, 10);
+    child: opacity {
+      opacity: 0.8;
+      child: color {
+        bounds: -50 -50 100 100;
+        color: rgb(255,0,0);
+      }
+    }
+  }
+}
diff --git a/testsuite/gsk/compare/clip-translate-offscreen.png b/testsuite/gsk/compare/clip-translate-offscreen.png
new file mode 100644 (file)
index 0000000..9fe22b0
Binary files /dev/null and b/testsuite/gsk/compare/clip-translate-offscreen.png differ
index 53a5f6cc46c53a21f0c12ca57a34f33f6f8d0473..999e955ce5320b8a426f75f73768995433b177c1 100644 (file)
@@ -31,6 +31,7 @@ compare_render_tests = [
   'clipped-repeat-3d-ngl',
   'clipped_rounded_clip',
   'clip-nested1',
+  'clip-translate-offscreen',
   'color-blur0',
   'color-matrix-identity',
   'color-matrix-parsing',