From: Benjamin Otte Date: Wed, 10 May 2023 19:56:53 +0000 (+0200) Subject: testsuite: Add clip-translate-offscreen test X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~253^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=853e8719c6d811ca0d336fd9cfa469e6f8c64495;p=gtk4.git testsuite: Add clip-translate-offscreen test 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. --- diff --git a/testsuite/gsk/compare/clip-translate-offscreen.node b/testsuite/gsk/compare/clip-translate-offscreen.node new file mode 100644 index 0000000000..b5313e3de5 --- /dev/null +++ b/testsuite/gsk/compare/clip-translate-offscreen.node @@ -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 index 0000000000..9fe22b0b47 Binary files /dev/null and b/testsuite/gsk/compare/clip-translate-offscreen.png differ diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 53a5f6cc46..999e955ce5 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -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',