summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2023-05-10 21:56:53 +0200
committerBenjamin Otte <otte@redhat.com>2023-05-16 18:53:27 +0200
commit853e8719c6d811ca0d336fd9cfa469e6f8c64495 (patch)
tree89d130860715cc586cfb12c46f7b584859bd1d07
parent8d528350b94f3df5987a2d18c8d0bb3796363dec (diff)
downloadgtk+-853e8719c6d811ca0d336fd9cfa469e6f8c64495.tar.gz
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.
-rw-r--r--testsuite/gsk/compare/clip-translate-offscreen.node17
-rw-r--r--testsuite/gsk/compare/clip-translate-offscreen.pngbin0 -> 167 bytes
-rw-r--r--testsuite/gsk/meson.build1
3 files changed, 18 insertions, 0 deletions
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
--- /dev/null
+++ b/testsuite/gsk/compare/clip-translate-offscreen.png
Binary files 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',