From 60e37d3368dbbec6b4747be3c7b570d2c47e77e3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 2 Sep 2020 18:05:16 -0400 Subject: [PATCH] Update gsk tests Add a clip-coordinates-2d test that is similar to clip-coordinates-3d, but actually uses a 2D transform. --- .../gsk/compare/clip-coordinates-2d.node | 22 ++++++++++++++++++ testsuite/gsk/compare/clip-coordinates-2d.png | Bin 0 -> 269 bytes testsuite/gsk/meson.build | 1 + 3 files changed, 23 insertions(+) create mode 100644 testsuite/gsk/compare/clip-coordinates-2d.node create mode 100644 testsuite/gsk/compare/clip-coordinates-2d.png diff --git a/testsuite/gsk/compare/clip-coordinates-2d.node b/testsuite/gsk/compare/clip-coordinates-2d.node new file mode 100644 index 0000000000..973f50e1dd --- /dev/null +++ b/testsuite/gsk/compare/clip-coordinates-2d.node @@ -0,0 +1,22 @@ +/* This test checks that we get sharp clip boundaries + * for 2d transforms. Compare with clip-coordinates-3d.node, + * which uses a general transform and gets offscreen + * rendering with GL_LINEAR. + */ +transform { + transform: scale(2); + child: container { + color { + bounds: 0 0 50 50; + color: transparent; + } + + clip { + clip: 10 10 30 30; + child: color { + bounds: 0 0 50 50; + color: red; + } + } + } +} diff --git a/testsuite/gsk/compare/clip-coordinates-2d.png b/testsuite/gsk/compare/clip-coordinates-2d.png new file mode 100644 index 0000000000000000000000000000000000000000..1da0014351662158945f517ae9941fd77d57ce62 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^DImg18H}8!s)2*+_@B27c!LaEF lhmf*I&p