[gtk+] Add a cross-fade node ref test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add a cross-fade node ref test
- Date: Sun, 8 Oct 2017 18:37:05 +0000 (UTC)
commit 87aaa5685b8e5dc755415a4c84c07c5cf456114e
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 8 14:36:35 2017 -0400
Add a cross-fade node ref test
The Vulkan renderer doesn't pass this one either, currently.
testsuite/gsk/cross-fade.node | Bin 0 -> 640324 bytes
testsuite/gsk/cross-fade.png | Bin 0 -> 1972 bytes
testsuite/gsk/test-render-nodes.c | 26 ++++++++++++++++++++++++++
3 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/testsuite/gsk/cross-fade.node b/testsuite/gsk/cross-fade.node
new file mode 100644
index 0000000..beaa2c6
Binary files /dev/null and b/testsuite/gsk/cross-fade.node differ
diff --git a/testsuite/gsk/cross-fade.png b/testsuite/gsk/cross-fade.png
new file mode 100644
index 0000000..8401b23
Binary files /dev/null and b/testsuite/gsk/cross-fade.png differ
diff --git a/testsuite/gsk/test-render-nodes.c b/testsuite/gsk/test-render-nodes.c
index f3d65f4..fc29d32 100644
--- a/testsuite/gsk/test-render-nodes.c
+++ b/testsuite/gsk/test-render-nodes.c
@@ -258,6 +258,31 @@ blendmode (void)
return container;
}
+static GskRenderNode *
+cross_fade (void)
+{
+ GskRenderNode *child1;
+ GskRenderNode *child2;
+ GskRenderNode *transform;
+ GskRenderNode *container;
+ graphene_matrix_t matrix;
+
+ child1 = cairo ();
+ child2 = cairo2 ();
+
+ graphene_matrix_init_translate (&matrix, &(const graphene_point3d_t) { 50, 50, 0 });
+ transform = gsk_transform_node_new (child2, &matrix);
+ gsk_render_node_unref (child2);
+ child2 = transform;
+
+ container = gsk_cross_fade_node_new (child1, child2, 0.5);
+
+ gsk_render_node_unref (child1);
+ gsk_render_node_unref (child2);
+
+ return container;
+}
+
static const struct {
const char *name;
GskRenderNode * (* func) (void);
@@ -266,6 +291,7 @@ static const struct {
{ "cairo.node", cairo },
{ "repeat.node", repeat },
{ "blendmode.node", blendmode },
+ { "cross-fade.node", cross_fade },
};
/*** test setup ***/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]