diff --git a/testsuite/gsk/test-render-nodes.c b/testsuite/gsk/test-render-nodes.c index f24ddb5d03..0bae5f1146 100644 --- a/testsuite/gsk/test-render-nodes.c +++ b/testsuite/gsk/test-render-nodes.c @@ -378,6 +378,39 @@ cross_fades (void) return container; } +static GskRenderNode * +transform (void) +{ + GskRenderNode *node; + GskRenderNode *nodes[10]; + GskRenderNode *container; + graphene_matrix_t scale; + graphene_matrix_t translate; + graphene_matrix_t matrix; + graphene_vec3_t axis; + graphene_vec3_init (&axis, 0.0, 0.0, 1.0); + int i; + + node = ducky (); + + for (i = 0; i < 10; i++) + { + graphene_matrix_init_rotate (&scale, 20.0 * i, &axis); + graphene_matrix_init_translate (&translate, &(const graphene_point3d_t) { i* 110, 0, 0 }); + graphene_matrix_multiply (&scale, &translate, &matrix); + nodes[i] = gsk_transform_node_new (node, &matrix); + } + + container = gsk_container_node_new (nodes, 5); + + for (i = 0; i < 10; i++) + gsk_render_node_unref (nodes[i]); + + gsk_render_node_unref (node); + + return container; +} + static const struct { const char *name; GskRenderNode * (* func) (void); @@ -389,6 +422,7 @@ static const struct { { "cross-fade.node", cross_fade }, { "blendmodes.node", blendmodes }, { "cross-fades.node", cross_fades }, + { "transform.node", transform }, }; /*** test setup ***/ diff --git a/testsuite/gsk/transform.node b/testsuite/gsk/transform.node new file mode 100644 index 0000000000..d2f37369e2 Binary files /dev/null and b/testsuite/gsk/transform.node differ diff --git a/testsuite/gsk/transform.png b/testsuite/gsk/transform.png new file mode 100644 index 0000000000..5d5488638b Binary files /dev/null and b/testsuite/gsk/transform.png differ