From: Benjamin Otte Date: Wed, 12 Jul 2023 09:38:32 +0000 (+0200) Subject: vulkan: Don't try that hard to use clear X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~60^2~21 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0edd7547c1e095ede1e1f8c45dc93291b4913c33;p=gtk4.git vulkan: Don't try that hard to use clear For small regions, the optimization doesn't matter that much, so we don't need to do lots of work on the CPU. In particular, this should catch icons and their backgrounds (32x32), but I was generous in selecting the number. Gets my discrete AMD on widget-factory back to the 1900fps it had before this optimization while making the driver clock the GPU's shader at 1.7GHz instead of the 2.1GHz it used before. --- diff --git a/gsk/vulkan/gskvulkanrenderpass.c b/gsk/vulkan/gskvulkanrenderpass.c index 51d849c1c6..a6d954c6f8 100644 --- a/gsk/vulkan/gskvulkanrenderpass.c +++ b/gsk/vulkan/gskvulkanrenderpass.c @@ -361,6 +361,7 @@ gsk_vulkan_render_pass_add_color_node (GskVulkanRenderPass *self, graphene_rect_intersection (&state->clip.rect.bounds, &rect, &clipped); if (gdk_rgba_is_opaque (color) && + node->bounds.size.width * node->bounds.size.height > 100 * 100 && /* not worth the effort for small images */ gsk_vulkan_parse_rect_is_integer (state, &clipped, &int_clipped)) { /* now handle all the clip */