tests: Link compare-render statically

This is a temporary change, only needed until we make the new
snapshot and rendernode apis public.
This commit is contained in:
Matthias Clasen 2024-08-05 16:09:42 -04:00
parent f9c9a03404
commit c1a99bf901
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
compare_render = executable('compare-render', compare_render = executable('compare-render',
['compare-render.c', '../reftests/reftest-compare.c', 'replay-node.c'], ['compare-render.c', '../reftests/reftest-compare.c', 'replay-node.c'],
dependencies: libgtk_dep, dependencies: libgtk_static_dep,
c_args: common_cflags, c_args: common_cflags,
) )

View File

@ -1,4 +1,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gtk/gtksnapshotprivate.h>
#include <gsk/gskrendernodeprivate.h>
void void
replay_node (GskRenderNode *node, GtkSnapshot *snapshot); replay_node (GskRenderNode *node, GtkSnapshot *snapshot);
@ -25,8 +27,11 @@ replay_cairo_node (GskRenderNode *node, GtkSnapshot *snapshot)
static void static void
replay_color_node (GskRenderNode *node, GtkSnapshot *snapshot) replay_color_node (GskRenderNode *node, GtkSnapshot *snapshot)
{ {
/* FIXME: can't recreate color nodes without gsk_color_node_new2 */ graphene_rect_t bounds;
gtk_snapshot_append_node (snapshot, node); gsk_render_node_get_bounds (node, &bounds);
gtk_snapshot_append_color2 (snapshot,
gsk_color_node_get_color2 (node),
&bounds);
} }
static void static void