mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
vulkan: Do intersection check for every node
This is more expensive, but it finds more cases, and in particular it catches corner cases like empty nodes or fully clipped nodes that might otherwise make the kernel throw signals in our direction.
This commit is contained in:
parent
82ba8c848b
commit
1f8045ddbe
@ -355,9 +355,6 @@ gsk_vulkan_render_pass_add_container_node (GskVulkanRenderPass *self,
|
||||
const GskVulkanParseState *state,
|
||||
GskRenderNode *node)
|
||||
{
|
||||
if (!gsk_vulkan_clip_intersects_rect (&state->clip, &state->offset, &node->bounds))
|
||||
return TRUE;
|
||||
|
||||
for (guint i = 0; i < gsk_container_node_get_n_children (node); i++)
|
||||
gsk_vulkan_render_pass_add_node (self, render, state, gsk_container_node_get_child (node, i));
|
||||
|
||||
@ -1170,6 +1167,11 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
GskRenderNodeType node_type;
|
||||
gboolean fallback = FALSE;
|
||||
|
||||
/* This catches the corner cases of empty nodes, so after this check
|
||||
* there's quaranteed to be at least 1 pixel that needs to be drawn */
|
||||
if (!gsk_vulkan_clip_intersects_rect (&state->clip, &state->offset, &node->bounds))
|
||||
return;
|
||||
|
||||
node_type = gsk_render_node_get_node_type (node);
|
||||
node_func = nodes_vtable[node_type];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user