From c1a99bf901af70c8f9633ae69818d8ba2ffa032c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Aug 2024 16:09:42 -0400 Subject: [PATCH] tests: Link compare-render statically This is a temporary change, only needed until we make the new snapshot and rendernode apis public. --- testsuite/gsk/meson.build | 2 +- testsuite/gsk/replay-node.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 5334a2d2c4..d3a959632f 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -1,6 +1,6 @@ compare_render = executable('compare-render', ['compare-render.c', '../reftests/reftest-compare.c', 'replay-node.c'], - dependencies: libgtk_dep, + dependencies: libgtk_static_dep, c_args: common_cflags, ) diff --git a/testsuite/gsk/replay-node.c b/testsuite/gsk/replay-node.c index 9d246fb45a..a15a0e9f38 100644 --- a/testsuite/gsk/replay-node.c +++ b/testsuite/gsk/replay-node.c @@ -1,4 +1,6 @@ #include +#include +#include void replay_node (GskRenderNode *node, GtkSnapshot *snapshot); @@ -25,8 +27,11 @@ replay_cairo_node (GskRenderNode *node, GtkSnapshot *snapshot) static void replay_color_node (GskRenderNode *node, GtkSnapshot *snapshot) { - /* FIXME: can't recreate color nodes without gsk_color_node_new2 */ - gtk_snapshot_append_node (snapshot, node); + graphene_rect_t bounds; + gsk_render_node_get_bounds (node, &bounds); + gtk_snapshot_append_color2 (snapshot, + gsk_color_node_get_color2 (node), + &bounds); } static void