gpu: Apply clip to ubershader bounds

Fixes excessive bounds when using the ubershader for huge nodes
contained inside clip nodes.
This commit is contained in:
Benjamin Otte 2023-10-14 00:07:10 +02:00
parent 1b3eb3ecd1
commit e86fa6a072

View File

@ -681,12 +681,18 @@ gsk_gpu_node_processor_add_node_as_pattern (GskGpuNodeProcessor *self,
GskRenderNode *node)
{
GskGpuPatternWriter writer;
graphene_rect_t clipped;
g_assert (self->pending_globals == 0);
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clipped))
return;
gsk_gpu_pattern_writer_init (&writer,
self->frame,
&self->scale,
&self->offset,
&node->bounds);
&clipped);
if (!gsk_gpu_node_processor_create_node_pattern (&writer, node))
{