diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 2dcf6727e9..0674324dc3 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -706,8 +706,9 @@ gtk_snapshot_collect_repeat (GtkSnapshot *snapshot, graphene_rect_equal (child_bounds, &node->bounds)) { /* Repeating a color node entirely is pretty easy by just increasing - * the size of the color node. */ - GskRenderNode *color_node = gsk_color_node_new (gsk_color_node_get_color (node), bounds); + * the size of the color node. + */ + GskRenderNode *color_node = gsk_color_node_new2 (gsk_color_node_get_color2 (node), bounds); gsk_render_node_unref (node); diff --git a/testsuite/gsk/compare/repeat-color.node b/testsuite/gsk/compare/repeat-color.node new file mode 100644 index 0000000000..07596a654f --- /dev/null +++ b/testsuite/gsk/compare/repeat-color.node @@ -0,0 +1,8 @@ +repeat { + bounds: 0 0 40 40; + child-bounds: 0 0 10 10; + child: color { + bounds: 0 0 10 10; + color: color(srgb-linear 0.604 0 0); + } +} diff --git a/testsuite/gsk/compare/repeat-color.png b/testsuite/gsk/compare/repeat-color.png new file mode 100644 index 0000000000..f873fc8b47 Binary files /dev/null and b/testsuite/gsk/compare/repeat-color.png differ diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index da411d187b..9bd8276f48 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -133,6 +133,7 @@ compare_render_tests = [ 'repeat', 'repeating-linear-gradient-edge-colors', 'repeating-radial-gradient-edge-colors', + 'repeat-color', 'repeat-child-bounds', 'repeat-empty-child-bounds', 'repeat-huge-overdraw',