diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index bc8126884f..cec3728728 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h @@ -293,11 +293,11 @@ GskRenderNode * gsk_text_node_new (PangoFont double x, double y); GDK_AVAILABLE_IN_3_94 -PangoFont * gsk_text_node_get_font (GskRenderNode *node); +const PangoFont * gsk_text_node_peek_font (GskRenderNode *node); +GDK_AVAILABLE_IN_3_94 +const PangoGlyphString *gsk_text_node_peek_glyphs (GskRenderNode *node); GDK_AVAILABLE_IN_3_94 -PangoGlyphString * gsk_text_node_get_glyphs (GskRenderNode *node); -GDK_AVAILABLE_IN_3_94 -const GdkRGBA * gsk_text_node_get_color (GskRenderNode *node); +const GdkRGBA * gsk_text_node_peek_color (GskRenderNode *node); GDK_AVAILABLE_IN_3_94 float gsk_text_node_get_x (GskRenderNode *node); GDK_AVAILABLE_IN_3_94 diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1072dfcb18..e35c1cdf5b 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -4090,7 +4090,7 @@ gsk_text_node_new (PangoFont *font, } const GdkRGBA * -gsk_text_node_get_color (GskRenderNode *node) +gsk_text_node_peek_color (GskRenderNode *node) { GskTextNode *self = (GskTextNode *) node; @@ -4099,8 +4099,8 @@ gsk_text_node_get_color (GskRenderNode *node) return &self->color; } -PangoFont * -gsk_text_node_get_font (GskRenderNode *node) +const PangoFont * +gsk_text_node_peek_font (GskRenderNode *node) { GskTextNode *self = (GskTextNode *) node; @@ -4109,8 +4109,8 @@ gsk_text_node_get_font (GskRenderNode *node) return self->font; } -PangoGlyphString * -gsk_text_node_get_glyphs (GskRenderNode *node) +const PangoGlyphString * +gsk_text_node_peek_glyphs (GskRenderNode *node) { GskTextNode *self = (GskTextNode *) node; diff --git a/gsk/gskvulkanrenderpass.c b/gsk/gskvulkanrenderpass.c index 83d9e2edd2..40d2717c08 100644 --- a/gsk/gskvulkanrenderpass.c +++ b/gsk/gskvulkanrenderpass.c @@ -236,7 +236,7 @@ gsk_vulkan_render_pass_free (GskVulkanRenderPass *self) } static gboolean -font_has_color_glyphs (PangoFont *font) +font_has_color_glyphs (const PangoFont *font) { cairo_scaled_font_t *scaled_font; gboolean has_color = FALSE; @@ -370,8 +370,8 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, case GSK_TEXT_NODE: { - PangoFont *font = gsk_text_node_get_font (node); - PangoGlyphString *glyphs = gsk_text_node_get_glyphs (node); + const PangoFont *font = gsk_text_node_peek_font (node); + const PangoGlyphString *glyphs = gsk_text_node_peek_glyphs (node); int i; guint count; guint texture_index; @@ -412,7 +412,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, if (gi->glyph != PANGO_GLYPH_EMPTY && !(gi->glyph & PANGO_GLYPH_UNKNOWN_FLAG)) { - texture_index = gsk_vulkan_renderer_cache_glyph (renderer, font, gi->glyph); + texture_index = gsk_vulkan_renderer_cache_glyph (renderer, (PangoFont *)font, gi->glyph); if (op.text.texture_index == G_MAXUINT) op.text.texture_index = texture_index; if (texture_index != op.text.texture_index) @@ -1225,9 +1225,9 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, data + n_bytes + offset, GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)), &op->text.node->bounds, - gsk_text_node_get_font (op->text.node), - gsk_text_node_get_glyphs (op->text.node), - gsk_text_node_get_color (op->text.node), + gsk_text_node_peek_font (op->text.node), + gsk_text_node_peek_glyphs (op->text.node), + gsk_text_node_peek_color (op->text.node), gsk_text_node_get_x (op->text.node), gsk_text_node_get_y (op->text.node), op->text.start_glyph, @@ -1243,8 +1243,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, data + n_bytes + offset, GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)), &op->text.node->bounds, - gsk_text_node_get_font (op->text.node), - gsk_text_node_get_glyphs (op->text.node), + gsk_text_node_peek_font (op->text.node), + gsk_text_node_peek_glyphs (op->text.node), gsk_text_node_get_x (op->text.node), gsk_text_node_get_y (op->text.node), op->text.start_glyph, diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 1aeee3b23d..ff59dd7151 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c @@ -378,16 +378,16 @@ populate_render_node_properties (GtkListStore *store, case GSK_TEXT_NODE: { - PangoFont *font = gsk_text_node_get_font (node); - PangoGlyphString *glyphs = gsk_text_node_get_glyphs (node); - const GdkRGBA *color = gsk_text_node_get_color (node); + const PangoFont *font = gsk_text_node_peek_font (node); + const PangoGlyphString *glyphs = gsk_text_node_peek_glyphs (node); + const GdkRGBA *color = gsk_text_node_peek_color (node); float x = gsk_text_node_get_x (node); float y = gsk_text_node_get_y (node); PangoFontDescription *desc; GString *s; int i; - desc = pango_font_describe (font); + desc = pango_font_describe ((PangoFont *)font); tmp = pango_font_description_to_string (desc); add_text_row (store, "Font", tmp); g_free (tmp);