From 1000d971f9a742d21699d65963dddd6d203f0e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 24 Apr 2019 12:48:59 +0200 Subject: [PATCH] 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. --- .../gsk/compare/cross-fade-in-opacity.node | 23 ++++++++++++++++++ .../gsk/compare/cross-fade-in-opacity.png | Bin 0 -> 618 bytes testsuite/gsk/meson.build | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 testsuite/gsk/compare/cross-fade-in-opacity.node create mode 100644 testsuite/gsk/compare/cross-fade-in-opacity.png diff --git a/testsuite/gsk/compare/cross-fade-in-opacity.node b/testsuite/gsk/compare/cross-fade-in-opacity.node new file mode 100644 index 0000000000..ff65e3a8cb --- /dev/null +++ b/testsuite/gsk/compare/cross-fade-in-opacity.node @@ -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; + } +} diff --git a/testsuite/gsk/compare/cross-fade-in-opacity.png b/testsuite/gsk/compare/cross-fade-in-opacity.png new file mode 100644 index 0000000000000000000000000000000000000000..83adbe748a9d92e7095455fc51d21a54a6231a62 GIT binary patch literal 618 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k2}mkgS)K$^Y)RhkE)4%caKYZ?lNlJ8gJV!GM9qQS`UI!r5bLn_5ozuzrttH?KHu!>!HL4F6ShgbpbwjxgfmJGp`> mhGqH|ZO2EP-@$SHk&&O3^{{8ql?TAY!{F)a=d#Wzp$Pz+AE$o+ literal 0 HcmV?d00001 diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index a9c8b4460a..c045802c88 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -48,7 +48,6 @@ test('nodes (cairo)', test_render_nodes, # Interesting render nodes proven to be rendered 'correctly' by the GL renderer. gl_tests = [ - ['cross fade in opacity', 'cross-fade-in-opacity'], ] foreach gl_test : gl_tests @@ -69,6 +68,7 @@ endforeach compare_render_tests = [ 'clip-coordinates-3d', 'clipped_rounded_clip', + 'cross-fade-in-opacity', 'opacity_clip', 'outset_shadow_offset_both', 'outset_shadow_offset_x',