diff options
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gskrendernodeimpl.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 767e7f87c7..5fa0dbc46a 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -2331,6 +2331,28 @@ gsk_color_matrix_node_draw (GskRenderNode *node, cairo_pattern_destroy (pattern); } +static void +gsk_color_matrix_node_diff (GskRenderNode *node1, + GskRenderNode *node2, + cairo_region_t *region) +{ + GskColorMatrixNode *self1 = (GskColorMatrixNode *) node1; + GskColorMatrixNode *self2 = (GskColorMatrixNode *) node2; + + if (!graphene_vec4_equal (&self1->color_offset, &self2->color_offset)) + goto nope; + + if (!graphene_matrix_equal_fast (&self1->color_matrix, &self2->color_matrix)) + goto nope; + + gsk_render_node_diff (self1->child, self2->child, region); + return; + +nope: + gsk_render_node_diff_impossible (node1, node2, region); + return; +} + /** * gsk_color_matrix_node_new: * @child: The node to draw @@ -4311,7 +4333,7 @@ gsk_render_node_init_types_once (void) gsk_color_matrix_node_finalize, gsk_color_matrix_node_draw, NULL, - NULL, + gsk_color_matrix_node_diff, }; GType node_type = gsk_render_node_type_register_static (I_("GskColorMatrixNode"), &node_info); |