mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
gsk: Clip shadow node before push_group()
We want to be sure to push a group that's as small as possible, so we clip to the child's bounds, because that's the smallest we can go.
This commit is contained in:
parent
6f9f18009c
commit
6203cecf97
@ -2899,9 +2899,14 @@ gsk_shadow_node_draw (GskRenderNode *node,
|
||||
cairo_pattern_t *pattern;
|
||||
gsize i;
|
||||
|
||||
cairo_save (cr);
|
||||
/* clip so the push_group() creates a small surface */
|
||||
gsk_cairo_rectangle (cr, &self->child->bounds);
|
||||
cairo_clip (cr);
|
||||
cairo_push_group (cr);
|
||||
gsk_render_node_draw (self->child, cr);
|
||||
pattern = cairo_pop_group (cr);
|
||||
cairo_restore (cr);
|
||||
|
||||
for (i = 0; i < self->n_shadows; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user