From 4f3c7cd48af0f3180c401673c94c7427cb8ba0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 21 Apr 2018 11:20:15 +0200 Subject: [PATCH] gsk: Make gsk_text_node_new_with_bounds private We pulled out the bounds calculation for performance reasons, but the caller can't know how to properly compute them. Inside gtk+, we can do that but it's not good enough for public API. --- gsk/gskrendernode.h | 7 ------- gsk/gskrendernodeprivate.h | 8 ++++++++ gtk/gskpango.c | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index d4c849208c..24e49b6385 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h @@ -298,13 +298,6 @@ GskRenderNode * gsk_text_node_new (PangoFont double x, double y); GDK_AVAILABLE_IN_ALL -GskRenderNode * gsk_text_node_new_with_bounds (PangoFont *font, - PangoGlyphString *glyphs, - const GdkRGBA *color, - double x, - double y, - const graphene_rect_t *bounds); -GDK_AVAILABLE_IN_ALL const PangoFont * gsk_text_node_peek_font (GskRenderNode *node); GDK_AVAILABLE_IN_ALL guint gsk_text_node_get_num_glyphs (GskRenderNode *node); diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h index 5cae3ec562..89a7f21363 100644 --- a/gsk/gskrendernodeprivate.h +++ b/gsk/gskrendernodeprivate.h @@ -61,6 +61,14 @@ GskRenderNode * gsk_render_node_deserialize_node (GskRenderNodeType typ GskRenderNode * gsk_cairo_node_new_for_surface (const graphene_rect_t *bounds, cairo_surface_t *surface); +GskRenderNode * gsk_text_node_new_with_bounds (PangoFont *font, + PangoGlyphString *glyphs, + const GdkRGBA *color, + double x, + double y, + const graphene_rect_t *bounds); + + G_END_DECLS #endif /* __GSK_RENDER_NODE_PRIVATE_H__ */ diff --git a/gtk/gskpango.c b/gtk/gskpango.c index 1a25920ca2..a486b81add 100644 --- a/gtk/gskpango.c +++ b/gtk/gskpango.c @@ -20,6 +20,7 @@ #include "config.h" #include "gsk/gsk.h" +#include "gsk/gskrendernodeprivate.h" #include "gskpango.h" #include "gtksnapshotprivate.h"