summaryrefslogtreecommitdiff
path: root/testsuite/gsk
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2019-04-24 12:48:59 +0200
committerBenjamin Otte <otte@redhat.com>2019-05-05 07:18:39 +0200
commit1000d971f9a742d21699d65963dddd6d203f0e53 (patch)
tree08e97d0b353217f4a1556064e855537be7f0a58e /testsuite/gsk
parent349e6af2c8e2ff42406d61f399bab8430a42bf28 (diff)
downloadgtk+-1000d971f9a742d21699d65963dddd6d203f0e53.tar.gz
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.
Diffstat (limited to 'testsuite/gsk')
-rw-r--r--testsuite/gsk/compare/cross-fade-in-opacity.node23
-rw-r--r--testsuite/gsk/compare/cross-fade-in-opacity.pngbin0 -> 618 bytes
-rw-r--r--testsuite/gsk/meson.build2
3 files changed, 24 insertions, 1 deletions
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 0000000000..83adbe748a
--- /dev/null
+++ b/testsuite/gsk/compare/cross-fade-in-opacity.png
Binary files differ
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',