rendernode: Fix container nodes preferred depth
The current code injects an implicit GDK_MEMORY_U8 into this. It is harmless now, but may not be in future. So avoid it.
This commit is contained in:
@@ -3335,17 +3335,15 @@ gsk_container_node_new (GskRenderNode **children,
|
||||
|
||||
self->children[0] = gsk_render_node_ref (children[0]);
|
||||
node->offscreen_for_opacity = children[0]->offscreen_for_opacity;
|
||||
node->preferred_depth = children[0]->preferred_depth;
|
||||
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]));
|
||||
|
||||
for (guint i = 1; i < n_children; i++)
|
||||
{
|
||||
self->children[i] = gsk_render_node_ref (children[i]);
|
||||
self->disjoint = self->disjoint && !gsk_rect_intersects (&bounds, &(children[i]->bounds));
|
||||
graphene_rect_union (&bounds, &(children[i]->bounds), &bounds);
|
||||
node->preferred_depth = gdk_memory_depth_merge (node->preferred_depth,
|
||||
gsk_render_node_get_preferred_depth (children[i]));
|
||||
node->preferred_depth = gdk_memory_depth_merge (node->preferred_depth, children[i]->preferred_depth);
|
||||
node->offscreen_for_opacity = node->offscreen_for_opacity || children[i]->offscreen_for_opacity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user