summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2023-05-16 17:29:31 +0200
committerBenjamin Otte <otte@redhat.com>2023-05-16 18:53:27 +0200
commitfde3d2cd50585ec2abef1313fbf4cd189c88a2a1 (patch)
treebf962e8f08004a7b1ec2b4fda89f510825818e05
parent099955b0c06dbddc9469bd3c8e63673a3a82883f (diff)
downloadgtk+-fde3d2cd50585ec2abef1313fbf4cd189c88a2a1.tar.gz
testsuite: Add testcase for z clipping
the near and far clipping plane are at -10000 and 10000 respectively. Test that the renderers respect that.
-rw-r--r--testsuite/gsk/compare/z-transform-clipping-bounds-3d.node28
-rw-r--r--testsuite/gsk/compare/z-transform-clipping-bounds-3d.pngbin0 -> 331 bytes
-rw-r--r--testsuite/gsk/meson.build1
3 files changed, 29 insertions, 0 deletions
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
index 0000000000..ebd4b09bd9
--- /dev/null
+++ b/testsuite/gsk/compare/z-transform-clipping-bounds-3d.node
@@ -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
index 0000000000..433e3c560f
--- /dev/null
+++ b/testsuite/gsk/compare/z-transform-clipping-bounds-3d.png
Binary files differ
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index 7ef11174ae..53a5f6cc46 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -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