mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Merge branch 'wip/otte/for-main' into 'main'
textbtree: Remove unnecessary check See merge request GNOME/gtk!6179
This commit is contained in:
commit
6dd9048c6d
@ -31,7 +31,7 @@ G_BEGIN_DECLS
|
||||
|
||||
#define GSK_TYPE_RENDER_NODE (gsk_render_node_get_type ())
|
||||
|
||||
#define GSK_IS_RENDER_NODE(obj) ((obj) != NULL)
|
||||
#define GSK_IS_RENDER_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSK_TYPE_RENDER_NODE))
|
||||
|
||||
#define GSK_SERIALIZATION_ERROR (gsk_serialization_error_quark ())
|
||||
|
||||
|
@ -236,9 +236,9 @@ gsk_vulkan_clip_transform (GskVulkanClip *dest,
|
||||
}
|
||||
|
||||
gboolean
|
||||
gsk_vulkan_clip_intersects_rect (const GskVulkanClip *self,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *rect)
|
||||
gsk_vulkan_clip_may_intersect_rect (const GskVulkanClip *self,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *rect)
|
||||
{
|
||||
graphene_rect_t r = *rect;
|
||||
r.origin.x += offset->x;
|
||||
@ -252,13 +252,9 @@ 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);
|
||||
|
||||
case GSK_VULKAN_CLIP_ROUNDED:
|
||||
return gsk_rounded_rect_intersects_rect (&self->rect, &r);
|
||||
return graphene_rect_intersection (&self->rect.bounds, &r, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ gboolean gsk_vulkan_clip_transform (GskVulk
|
||||
gboolean gsk_vulkan_clip_contains_rect (const GskVulkanClip *self,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *rect) G_GNUC_WARN_UNUSED_RESULT;
|
||||
gboolean gsk_vulkan_clip_intersects_rect (const GskVulkanClip *self,
|
||||
gboolean gsk_vulkan_clip_may_intersect_rect (const GskVulkanClip *self,
|
||||
const graphene_point_t *offset,
|
||||
const graphene_rect_t *rect) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
|
||||
/* 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))
|
||||
if (!gsk_vulkan_clip_may_intersect_rect (&state->clip, &state->offset, &node->bounds))
|
||||
return;
|
||||
|
||||
node_type = gsk_render_node_get_node_type (node);
|
||||
|
@ -3769,8 +3769,7 @@ _gtk_text_line_char_index (GtkTextLine *target_line)
|
||||
tos--;
|
||||
|
||||
/* Check that we have the root node on top of the stack. */
|
||||
g_assert (node_stack != NULL &&
|
||||
node_stack[tos] != NULL &&
|
||||
g_assert (node_stack[tos] != NULL &&
|
||||
node_stack[tos]->parent == NULL);
|
||||
|
||||
/* Add up chars in all nodes before the nodes in our stack.
|
||||
|
Loading…
Reference in New Issue
Block a user