testsuite: Add cross-fade-in-opacity test

Making sure that an opacity node doesn't end up reviving a node that's
hidden because the cross-fade has progress 0 or 1.
This commit is contained in:
Timm Bäder 2019-04-24 12:48:59 +02:00 committed by Benjamin Otte
parent 349e6af2c8
commit 1000d971f9
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,23 @@
/* Background */
color {
bounds: 0 0 200 200;
color: white;
}
/* It is important that the following node structure leaves the
* start child of the cross-fade node invisible. */
opacity {
opacity: 0.4;
child: cross-fade {
start: color {
color: blue;
bounds: 0 0 100 100;
}
end: color {
color: red;
bounds: 100 100 100 100;
}
progress: 1.0;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View File

@ -48,7 +48,6 @@ test('nodes (cairo)', test_render_nodes,
# Interesting render nodes proven to be rendered 'correctly' by the GL renderer. # Interesting render nodes proven to be rendered 'correctly' by the GL renderer.
gl_tests = [ gl_tests = [
['cross fade in opacity', 'cross-fade-in-opacity'],
] ]
foreach gl_test : gl_tests foreach gl_test : gl_tests
@ -69,6 +68,7 @@ endforeach
compare_render_tests = [ compare_render_tests = [
'clip-coordinates-3d', 'clip-coordinates-3d',
'clipped_rounded_clip', 'clipped_rounded_clip',
'cross-fade-in-opacity',
'opacity_clip', 'opacity_clip',
'outset_shadow_offset_both', 'outset_shadow_offset_both',
'outset_shadow_offset_x', 'outset_shadow_offset_x',