From: Matthias Clasen Date: Mon, 13 Mar 2023 17:20:02 +0000 (+0100) Subject: tests: Add more tests for texture scale nodes X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~5^2~2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ad84ee835226c8deec2dacf0305516f62f29a54e;p=gtk4.git tests: Add more tests for texture scale nodes --- diff --git a/testsuite/gsk/compare/texture-scale-magnify-rotate.node b/testsuite/gsk/compare/texture-scale-magnify-rotate.node new file mode 100644 index 0000000000..e50c8ba126 --- /dev/null +++ b/testsuite/gsk/compare/texture-scale-magnify-rotate.node @@ -0,0 +1,11 @@ +clip { + clip: 24995 24995 10 10; + child: transform { + transform: translate(25000, 25000) rotate(90) translate(-25000, -25000); + child: texture-scale { + texture: url("data:;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKElEQVQYlWNkYGD4z4AG/v/HEGJgwhDBAQZQIQs2hzMyMtLBauorBACQUgcSISWLRgAAAABJRU5ErkJggg=="); + bounds: 0 0 50000 50000; + filter: nearest; + } + } +} diff --git a/testsuite/gsk/compare/texture-scale-magnify-rotate.png b/testsuite/gsk/compare/texture-scale-magnify-rotate.png new file mode 100644 index 0000000000..9feff7a484 Binary files /dev/null and b/testsuite/gsk/compare/texture-scale-magnify-rotate.png differ diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 1ded899729..ca8f833589 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -77,6 +77,7 @@ compare_render_tests = [ 'scaled-texture', 'shadow-in-opacity', 'texture-scale-magnify-10000x', + 'texture-scale-magnify-rotate', 'texture-scale-stripes', 'texture-url', 'transform-in-transform', @@ -234,6 +235,8 @@ node_parser_tests = [ 'texture-fail.node', 'texture-fail.ref.node', 'texture-fail.ref.errors', + 'texture-scale-filters.node', + 'texture-scale-filters.ref.node', 'texture-scale-unknown-filter.errors', 'texture-scale-unknown-filter.node', 'texture-scale-unknown-filter.ref.node', diff --git a/testsuite/gsk/nodeparser/texture-scale-filters.node b/testsuite/gsk/nodeparser/texture-scale-filters.node new file mode 100644 index 0000000000..1aef466ce5 --- /dev/null +++ b/testsuite/gsk/nodeparser/texture-scale-filters.node @@ -0,0 +1,22 @@ +texture-scale { + texture: url('data:,'); + bounds: 0 0 50 50; +} + +texture-scale { + texture: url('data:,'); + bounds: 0 0 50 50; + filter: linear; +} + +texture-scale { + texture: url('data:,'); + bounds: 0 0 50 50; + filter: nearest; +} + +texture-scale { + texture: url('data:,'); + bounds: 0 0 50 50; + filter: trilinear; +} diff --git a/testsuite/gsk/nodeparser/texture-scale-filters.ref.node b/testsuite/gsk/nodeparser/texture-scale-filters.ref.node new file mode 100644 index 0000000000..957013272e --- /dev/null +++ b/testsuite/gsk/nodeparser/texture-scale-filters.ref.node @@ -0,0 +1,26 @@ +texture-scale { + bounds: 0 0 50 50; + texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\ +1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\ +"); +} +texture-scale { + bounds: 0 0 50 50; + texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\ +1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\ +"); +} +texture-scale { + bounds: 0 0 50 50; + filter: nearest; + texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\ +1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\ +"); +} +texture-scale { + bounds: 0 0 50 50; + filter: trilinear; + texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\ +1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\ +"); +}