testsuite: Add testcase for z clipping
authorBenjamin Otte <otte@redhat.com>
Tue, 16 May 2023 15:29:31 +0000 (17:29 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 16 May 2023 16:53:27 +0000 (18:53 +0200)
the near and far clipping plane are at -10000 and 10000 respectively.
Test that the renderers respect that.

testsuite/gsk/compare/z-transform-clipping-bounds-3d.node [new file with mode: 0644]
testsuite/gsk/compare/z-transform-clipping-bounds-3d.png [new file with mode: 0644]
testsuite/gsk/meson.build

diff --git a/testsuite/gsk/compare/z-transform-clipping-bounds-3d.node b/testsuite/gsk/compare/z-transform-clipping-bounds-3d.node
new file mode 100644 (file)
index 0000000..ebd4b09
--- /dev/null
@@ -0,0 +1,28 @@
+transform {
+  transform: translate3d(0, 0, -10000);
+  child: color {
+    bounds: 0 0 50 50;
+    color: rgb(255,0,0);
+  }
+}
+transform {
+  transform: translate3d(0, 0, -10001);
+  child: color {
+    bounds: 50 0 50 50;
+    color: rgb(255,255,0);
+  }
+}
+transform {
+  transform: translate3d(0, 0, 10000);
+  child: color {
+    bounds: 0 50 50 50;
+    color: rgb(0,255,0);
+  }
+}
+transform {
+  transform: translate3d(0, 0, 10001);
+  child: color {
+    bounds: 50 50 50 50;
+    color: rgb(0,0,255);
+  }
+}
diff --git a/testsuite/gsk/compare/z-transform-clipping-bounds-3d.png b/testsuite/gsk/compare/z-transform-clipping-bounds-3d.png
new file mode 100644 (file)
index 0000000..433e3c5
Binary files /dev/null and b/testsuite/gsk/compare/z-transform-clipping-bounds-3d.png differ
index 7ef11174ae3ecb0dda942ef1d8aec455bae1a229..53a5f6cc46c53a21f0c12ca57a34f33f6f8d0473 100644 (file)
@@ -88,6 +88,7 @@ compare_render_tests = [
   'texture-url',
   'transform-in-transform',
   'transform-in-transform-in-transform',
+  'z-transform-clipping-bounds-3d',
 ]
 
 # these are too sensitive to differences in the renderers