[gtk+] Expand the repeat node test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Expand the repeat node test
- Date: Sun, 8 Oct 2017 17:50:52 +0000 (UTC)
commit 8dc48d032245e33f65750e38edecd0eb49d6a4ac
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 8 13:49:59 2017 -0400
Expand the repeat node test
Still not exhaustive, but enough to find some issues.
testsuite/gsk/repeat.node | Bin 480164 -> 1921103 bytes
testsuite/gsk/repeat.png | Bin 604 -> 2578 bytes
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
index 3b57cf2..9595ee0 100644
Binary files a/testsuite/gsk/repeat.node and b/testsuite/gsk/repeat.node differ
diff --git a/testsuite/gsk/repeat.png b/testsuite/gsk/repeat.png
index a587cf9..065e6ff 100644
Binary files a/testsuite/gsk/repeat.png and b/testsuite/gsk/repeat.png differ
diff --git a/testsuite/gsk/test-render-nodes.c b/testsuite/gsk/test-render-nodes.c
index 1668239..f39f725 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 {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]