diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-10-08 13:49:59 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-10-08 13:50:41 -0400 |
commit | 8dc48d032245e33f65750e38edecd0eb49d6a4ac (patch) | |
tree | 1039b18a23ddb909b947c89db1ab16a35bda15ff /testsuite/gsk | |
parent | 1fe4e123566a4595de477d926d9a1edcb02a879e (diff) | |
download | gtk+-8dc48d032245e33f65750e38edecd0eb49d6a4ac.tar.gz |
Expand the repeat node test
Still not exhaustive, but enough to find some issues.
Diffstat (limited to 'testsuite/gsk')
-rw-r--r-- | testsuite/gsk/repeat.node | bin | 480164 -> 1921103 bytes | |||
-rw-r--r-- | testsuite/gsk/repeat.png | bin | 604 -> 2578 bytes | |||
-rw-r--r-- | testsuite/gsk/test-render-nodes.c | 44 |
3 files changed, 39 insertions, 5 deletions
diff --git a/testsuite/gsk/repeat.node b/testsuite/gsk/repeat.node Binary files differindex 3b57cf2203..9595ee0c53 100644 --- a/testsuite/gsk/repeat.node +++ b/testsuite/gsk/repeat.node diff --git a/testsuite/gsk/repeat.png b/testsuite/gsk/repeat.png Binary files differindex a587cf91bf..065e6ff95b 100644 --- a/testsuite/gsk/repeat.png +++ b/testsuite/gsk/repeat.png diff --git a/testsuite/gsk/test-render-nodes.c b/testsuite/gsk/test-render-nodes.c index 1668239919..f39f725540 100644 --- a/testsuite/gsk/test-render-nodes.c +++ b/testsuite/gsk/test-render-nodes.c @@ -157,18 +157,52 @@ cairo (void) static GskRenderNode * repeat (void) { - GskRenderNode *repeat; + GskRenderNode *repeat[4]; GskRenderNode *child; + GskRenderNode *transform; + GskRenderNode *container; + graphene_matrix_t matrix; child = cairo (); - repeat = gsk_repeat_node_new (&GRAPHENE_RECT_INIT (0, 0, 200, 200), - child, - &GRAPHENE_RECT_INIT (0, 0, 200, 600)); + repeat[0] = gsk_repeat_node_new (&GRAPHENE_RECT_INIT (0, 0, 200, 200), + child, + &GRAPHENE_RECT_INIT (0, 0, 200, 600)); + repeat[1] = gsk_repeat_node_new (&GRAPHENE_RECT_INIT (0, 200, 200, 200), + child, + &GRAPHENE_RECT_INIT (0, 0, 200, 600)); + repeat[2] = gsk_repeat_node_new (&GRAPHENE_RECT_INIT (0, 400, 200, 200), + child, + &GRAPHENE_RECT_INIT (0, 0, 200, 600)); + repeat[3] = gsk_repeat_node_new (&GRAPHENE_RECT_INIT (0, 100, 200, 640), + child, + &GRAPHENE_RECT_INIT (0, 100, 200, 400)); gsk_render_node_unref (child); - return repeat; + graphene_matrix_init_translate (&matrix, &(const graphene_point3d_t) { 0, 20, 0 }); + transform = gsk_transform_node_new (repeat[1], &matrix); + gsk_render_node_unref (repeat[1]); + repeat[1] = transform; + + graphene_matrix_init_translate (&matrix, &(const graphene_point3d_t) { 0, 40, 0 }); + transform = gsk_transform_node_new (repeat[2], &matrix); + gsk_render_node_unref (repeat[2]); + repeat[2] = transform; + + graphene_matrix_init_translate (&matrix, &(const graphene_point3d_t) { 220, -100, 0 }); + transform = gsk_transform_node_new (repeat[3], &matrix); + gsk_render_node_unref (repeat[3]); + repeat[3] = transform; + + container = gsk_container_node_new (repeat, 4); + + gsk_render_node_unref (repeat[0]); + gsk_render_node_unref (repeat[1]); + gsk_render_node_unref (repeat[2]); + gsk_render_node_unref (repeat[3]); + + return container; } static const struct { |