From: Benjamin Otte Date: Sat, 8 Jul 2023 08:42:07 +0000 (+0200) Subject: vulkan: intersect rects also for CLIP_NONE X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~66^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c601b673e3005277b5390b8af676793be2d5fe5;p=gtk4.git vulkan: intersect rects also for CLIP_NONE If we don't clip anything, we stil have bounds - either the framebuffer size or (more likely) the scissor rect. And we don't want to draw anything that is outside these bounds. So clip in those cases, too. Stops gtk4-demo --run=listbox from trying to render the whole listbox instead of only the visible parts. --- diff --git a/gsk/vulkan/gskvulkanclip.c b/gsk/vulkan/gskvulkanclip.c index 2b24773125..bf8a2732e1 100644 --- a/gsk/vulkan/gskvulkanclip.c +++ b/gsk/vulkan/gskvulkanclip.c @@ -252,8 +252,6 @@ gsk_vulkan_clip_intersects_rect (const GskVulkanClip *self, return FALSE; case GSK_VULKAN_CLIP_NONE: - return r.size.width > 0 && r.size.height > 0; - case GSK_VULKAN_CLIP_RECT: return graphene_rect_intersection (&self->rect.bounds, &r, NULL);