mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
gpu: Don't oversize node image
There's no need - even if given clip bounds - to render the parts outside the node. So clip to the node bounds.
This commit is contained in:
parent
59f6218426
commit
dc47abc60e
@ -950,9 +950,13 @@ gsk_gpu_node_processor_get_node_as_image (GskGpuNodeProcessor *self,
|
|||||||
{
|
{
|
||||||
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip))
|
if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip))
|
||||||
return NULL;
|
return NULL;
|
||||||
clip_bounds = &clip;
|
|
||||||
}
|
}
|
||||||
rect_round_to_pixels (clip_bounds, &self->scale, &self->offset, &clip);
|
else
|
||||||
|
{
|
||||||
|
if (!gsk_rect_intersection (clip_bounds, &node->bounds, &clip))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
rect_round_to_pixels (&clip, &self->scale, &self->offset, &clip);
|
||||||
|
|
||||||
image = gsk_gpu_get_node_as_image (self->frame,
|
image = gsk_gpu_get_node_as_image (self->frame,
|
||||||
&clip,
|
&clip,
|
||||||
|
Loading…
Reference in New Issue
Block a user