[gtk/wip/otte/nodeeditor2: 8/15] testsuite: Add cross-fade-in-opacity test



commit ed915df5aa423c13af379be48b61874e6fefad5d
Author: Timm Bäder <mail baedert org>
Date:   Wed Apr 24 12:48:59 2019 +0200

    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.

 testsuite/gsk/compare/cross-fade-in-opacity.gl.png | Bin 0 -> 618 bytes
 testsuite/gsk/compare/cross-fade-in-opacity.node   |  23 +++++++++++++++++++++
 testsuite/gsk/meson.build                          |   2 +-
 3 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/gsk/compare/cross-fade-in-opacity.gl.png 
b/testsuite/gsk/compare/cross-fade-in-opacity.gl.png
new file mode 100644
index 0000000000..d9e47b7bd3
Binary files /dev/null and b/testsuite/gsk/compare/cross-fade-in-opacity.gl.png differ
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/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',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]