gpu: Avoid offscreens for disjoint containers

When opacity is set but the container is disjoint - ie no children
overlap - don't redirect into an offscreen, because it's not necessary.
This commit is contained in:
Benjamin Otte
2024-02-12 08:30:40 +01:00
parent e492dac7fe
commit 2fe1f47e6d

View File

@@ -3734,6 +3734,12 @@ static void
gsk_gpu_node_processor_add_container_node (GskGpuNodeProcessor *self,
GskRenderNode *node)
{
if (self->opacity < 1.0 && !gsk_container_node_is_disjoint (node))
{
gsk_gpu_node_processor_add_without_opacity (self, node);
return;
}
for (guint i = 0; i < gsk_container_node_get_n_children (node); i++)
gsk_gpu_node_processor_add_node (self, gsk_container_node_get_child (node, i));
}
@@ -3773,7 +3779,7 @@ static const struct
},
[GSK_CONTAINER_NODE] = {
GSK_GPU_GLOBAL_MATRIX | GSK_GPU_GLOBAL_SCALE | GSK_GPU_GLOBAL_CLIP | GSK_GPU_GLOBAL_SCISSOR,
0,
GSK_GPU_HANDLE_OPACITY,
gsk_gpu_node_processor_add_container_node,
NULL,
},