From 853e8719c6d811ca0d336fd9cfa469e6f8c64495 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 10 May 2023 21:56:53 +0200 Subject: [PATCH] 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. --- .../gsk/compare/clip-translate-offscreen.node | 17 +++++++++++++++++ .../gsk/compare/clip-translate-offscreen.png | Bin 0 -> 167 bytes testsuite/gsk/meson.build | 1 + 3 files changed, 18 insertions(+) create mode 100644 testsuite/gsk/compare/clip-translate-offscreen.node create mode 100644 testsuite/gsk/compare/clip-translate-offscreen.png 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 0000000000000000000000000000000000000000..9fe22b0b47f70df7f9dd2d61525fd997b5e3430e GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nETJWm(Lkc`H+H#hP&2kk literal 0 HcmV?d00001 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', -- 2.30.2