From e1bae384f059046f1786437cc650fa0b3464c169 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 25 Dec 2023 19:27:03 +0100 Subject: [PATCH] testsuite: Add a shadow test This test tests that shadows that are offset to outside the clip region but where the blur goes back into the clip region get correctly drawn and not optimized away. To view what the test actually draws, remove at least the color-matrix - it's only used so the blurring algorithm doesn't cause different results - and maybe also the clip node. --- .../compare/shadow-offset-to-outside-clip.node | 13 +++++++++++++ .../gsk/compare/shadow-offset-to-outside-clip.png | Bin 0 -> 265 bytes testsuite/gsk/meson.build | 1 + 3 files changed, 14 insertions(+) create mode 100644 testsuite/gsk/compare/shadow-offset-to-outside-clip.node create mode 100644 testsuite/gsk/compare/shadow-offset-to-outside-clip.png diff --git a/testsuite/gsk/compare/shadow-offset-to-outside-clip.node b/testsuite/gsk/compare/shadow-offset-to-outside-clip.node new file mode 100644 index 0000000000..1f0e0e782f --- /dev/null +++ b/testsuite/gsk/compare/shadow-offset-to-outside-clip.node @@ -0,0 +1,13 @@ +color-matrix { + matrix: matrix3d(256, 0, 0, 0, 0, 256, 0, 0, 0, 0, 256, 0, 0, 0, 0, 256); + child: clip { + clip: -52 44 80 80; + child: shadow { + shadows: rgb(255,0,0) 65 0 17, rgb(255,0,0) -65 0 17, rgb(255,0,0) 0 -65 17, rgb(255,0,0) 0 65 17; + child: color { + bounds: -37 59 50 50; + color: rgb(0,0,255); + } + } + } +} diff --git a/testsuite/gsk/compare/shadow-offset-to-outside-clip.png b/testsuite/gsk/compare/shadow-offset-to-outside-clip.png new file mode 100644 index 0000000000000000000000000000000000000000..6e0c143778606112475faad46c821ba315445f73 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdl8)7d%}YLn`LHy|a