vulkan: intersect rects also for CLIP_NONE
authorBenjamin Otte <otte@redhat.com>
Sat, 8 Jul 2023 08:42:07 +0000 (10:42 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 10 Jul 2023 04:32:01 +0000 (06:32 +0200)
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.

gsk/vulkan/gskvulkanclip.c

index 2b2477312594be7c6fbabe583a8625803584be3d..bf8a2732e18bb825fab280ccd0ce6f9d335e1774 100644 (file)
@@ -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);