gsk: Speed up mask nodes with cairo

Switch symbolc icon drawing from color-matrix to mask nodes
make the performance of the iconscroll demo crater (from 60fps
to 10fps).

Apply the same optimization we already have for color-matrix
nodes when drawing mask nodes. This gets us back to 60fps.

Fixes: #6700
This commit is contained in:
Matthias Clasen 2024-05-10 07:24:25 -04:00
parent d73d5819d5
commit 995eb418a3

View File

@ -6396,6 +6396,10 @@ gsk_mask_node_draw (GskRenderNode *node,
graphene_matrix_t color_matrix;
graphene_vec4_t color_offset;
/* clip so the push_group() creates a smaller surface */
gsk_cairo_rectangle (cr, &node->bounds);
cairo_clip (cr);
if (has_empty_clip (cr))
return;