testsuite: Add a test for stripes
authorBenjamin Otte <otte@redhat.com>
Sat, 4 Mar 2023 01:50:38 +0000 (02:50 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 4 Mar 2023 01:50:38 +0000 (02:50 +0100)
The GL renderer was creating sripes for nodes that were scaled in
particular ways, probably due to rounding errors.

This testsuite focuses on one of those stripes to make sure they are
gone.

testsuite/gsk/compare/texture-scale-stripes.node [new file with mode: 0644]
testsuite/gsk/compare/texture-scale-stripes.png [new file with mode: 0644]
testsuite/gsk/meson.build

diff --git a/testsuite/gsk/compare/texture-scale-stripes.node b/testsuite/gsk/compare/texture-scale-stripes.node
new file mode 100644 (file)
index 0000000..acd72b2
--- /dev/null
@@ -0,0 +1,8 @@
+clip {
+  clip: 3950 3950 100 100;
+  child: texture-scale {
+    bounds: 0 0 19991 19991;
+    filter: nearest;
+    texture: url('data:,<svg><rect width="10" height="10" style="fill:red" /></svg>');
+  }
+}
\ No newline at end of file
diff --git a/testsuite/gsk/compare/texture-scale-stripes.png b/testsuite/gsk/compare/texture-scale-stripes.png
new file mode 100644 (file)
index 0000000..e46858c
Binary files /dev/null and b/testsuite/gsk/compare/texture-scale-stripes.png differ
index ce007e667b2e6c3f882fd69f91b8c3b82c746b2e..f52a77025e0985daa42897d0ce7d171f164777bb 100644 (file)
@@ -77,6 +77,7 @@ compare_render_tests = [
   'scaled-texture',
   'shadow-in-opacity',
   'texture-scale-magnify-10000x',
+  'texture-scale-stripes',
   'texture-url',
   'transform-in-transform',
   'transform-in-transform-in-transform',