testsuite: Add a test for scaled texture clipping

This tests that the result is suitably clipped for doing linear
blending - the rightmost green pixel that is technically offscreen
is blending into the red pixel and turning the test yellow.

Cairo gets this wrong for some reason I didn't investigate.
This commit is contained in:
Benjamin Otte 2024-02-14 00:18:43 +01:00
parent cb6c720d37
commit 1afc7a9210
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
clip {
clip: 35 1 2 2;
child: color-matrix {
matrix: matrix3d(1000, 0, 0, 0, 0, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
child: transform {
transform: scale(8);
child: texture-scale {
bounds: 0 0 10 10;
filter: nearest;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAYAAAD0In+KAAAAEUlEQVQImWP4z8Dwn+E/w38AEPgD\
/V+dao0AAAAASUVORK5CYII=\
");
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

View File

@ -134,6 +134,7 @@ compare_render_tests = [
'scaled-cairo',
'scaled-texture',
'scaled-texture-scale',
'scaled-texture-scale-clip-nocairo',
'scale0-crash',
'shadow-behind',
'shadow-clip-contents',