From: Benjamin Otte Date: Tue, 16 May 2023 15:29:31 +0000 (+0200) Subject: testsuite: Add testcase for z clipping X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~253^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fde3d2cd50585ec2abef1313fbf4cd189c88a2a1;p=gtk4.git testsuite: Add testcase for z clipping the near and far clipping plane are at -10000 and 10000 respectively. Test that the renderers respect that. --- 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 Binary files /dev/null and b/testsuite/gsk/compare/z-transform-clipping-bounds-3d.png 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