testsuite: Add a repeat test for child bounds

Test that if the child is a texture that extends the child bounds, that
extension does not get repeated when rendering.

This can easily happen when the child is not drawn as an offscreen, but
instead the texture cache is consulted and no check for matching size is
done.
This commit is contained in:
Benjamin Otte
2023-12-23 14:17:35 +01:00
parent 72c58ccd7d
commit 7f7254f10b
3 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
repeat {
bounds: 0 0 10 10;
child-bounds: 0 0 1 1;
child: texture {
bounds: -1 -1 3 3;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAAGklEQVQImWP8z8DwnwEKmBgYGBgY\
oXxGZBkAcTMFAbj7zAkAAAAASUVORK5CYII=\
");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

View File

@@ -90,9 +90,10 @@ compare_render_tests = [
'repeat',
'repeating-linear-gradient-edge-colors',
'repeating-radial-gradient-edge-colors',
'repeat-no-repeat',
'repeat-child-bounds',
'repeat-empty-child-bounds',
'repeat-negative-coords',
'repeat-no-repeat',
'repeat-texture',
'repeating-gradient-scaled',
'scale-textures-negative-ngl',