Merge branch 'wip/otte/for-main' into 'main'

gsk: Respect offscreen_for_opacity of first child

Closes #6350

See merge request GNOME/gtk!6800
This commit is contained in:
Benjamin Otte 2024-01-22 17:52:33 +00:00
commit 3451c2e72c
4 changed files with 17 additions and 0 deletions

View File

@ -3335,6 +3335,7 @@ gsk_container_node_new (GskRenderNode **children,
self->children = g_malloc_n (n_children, sizeof (GskRenderNode *));
self->children[0] = gsk_render_node_ref (children[0]);
node->offscreen_for_opacity = children[0]->offscreen_for_opacity;
gsk_rect_init_from_rect (&bounds, &(children[0]->bounds));
node->preferred_depth = gdk_memory_depth_merge (node->preferred_depth,
gsk_render_node_get_preferred_depth (children[0]));

View File

@ -0,0 +1,15 @@
opacity {
opacity: 0.6;
child: container {
container {
color {
bounds: 0 0 40 40;
color: rgb(255,0,0);
}
color {
bounds: 10 10 40 40;
color: rgb(0,255,0);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

View File

@ -45,6 +45,7 @@ compare_render_tests = [
'color-matrix-merge',
'color-matrix-parsing',
'conic-gradient-with-64-colorstops',
'container-single-child-offscreen-for-opacity',
'crossfade-clip-both-children',
'cross-fade-clipped-with-huge-children-nogl',
'cross-fade-in-opacity',