cogl/pango: Remove various unused private functions

A quick cleanup in preparation for moving cogl-pango to libst later

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3823>
This commit is contained in:
Bilal Elmoussaoui 2024-06-18 10:29:51 +02:00 committed by Marge Bot
parent 2e2c54e356
commit c9c64f0990
6 changed files with 8 additions and 94 deletions

View File

@ -473,7 +473,7 @@ _cogl_pango_display_list_node_free (CoglPangoDisplayListNode *node)
g_free (node);
}
void
static void
_cogl_pango_display_list_clear (CoglPangoDisplayList *dl)
{
g_slist_free_full (dl->nodes, (GDestroyNotify)

View File

@ -73,9 +73,6 @@ _cogl_pango_display_list_render (CoglFramebuffer *framebuffer,
CoglPangoDisplayList *dl,
const CoglColor *color);
void
_cogl_pango_display_list_clear (CoglPangoDisplayList *dl);
void
_cogl_pango_display_list_free (CoglPangoDisplayList *dl);

View File

@ -85,33 +85,14 @@ cogl_pango_font_map_create_context (CoglPangoFontMap *fm)
return pango_font_map_create_context (PANGO_FONT_MAP (fm));
}
static CoglPangoFontMapPriv *
_cogl_pango_font_map_get_priv (CoglPangoFontMap *fm)
{
return g_object_get_qdata (G_OBJECT (fm),
cogl_pango_font_map_get_priv_key ());
}
PangoRenderer *
_cogl_pango_font_map_get_renderer (CoglPangoFontMap *fm)
{
CoglPangoFontMapPriv *priv = _cogl_pango_font_map_get_priv (fm);
if (G_UNLIKELY (!priv->renderer))
priv->renderer = _cogl_pango_renderer_new (priv->ctx);
return priv->renderer;
}
PangoRenderer *
cogl_pango_font_map_get_renderer (CoglPangoFontMap *fm)
{
return _cogl_pango_font_map_get_renderer (fm);
}
CoglContext *
_cogl_pango_font_map_get_cogl_context (CoglPangoFontMap *fm)
{
CoglPangoFontMapPriv *priv = _cogl_pango_font_map_get_priv (fm);
return priv->ctx;
CoglPangoFontMapPriv *priv = g_object_get_qdata (G_OBJECT (fm),
cogl_pango_font_map_get_priv_key ());
if (G_UNLIKELY (!priv->renderer))
priv->renderer = _cogl_pango_renderer_new (priv->ctx);
return priv->renderer;
}
void
@ -123,33 +104,16 @@ cogl_pango_font_map_set_resolution (CoglPangoFontMap *font_map,
pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (font_map), dpi);
}
void
cogl_pango_font_map_clear_glyph_cache (CoglPangoFontMap *fm)
{
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
_cogl_pango_renderer_clear_glyph_cache (COGL_PANGO_RENDERER (renderer));
}
void
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *fm,
gboolean value)
{
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
PangoRenderer *renderer = cogl_pango_font_map_get_renderer (fm);
_cogl_pango_renderer_set_use_mipmapping (COGL_PANGO_RENDERER (renderer),
value);
}
gboolean
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *fm)
{
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
return
_cogl_pango_renderer_get_use_mipmapping (COGL_PANGO_RENDERER (renderer));
}
static GQuark
cogl_pango_font_map_get_priv_key (void)
{

View File

@ -42,21 +42,8 @@ G_BEGIN_DECLS
PangoRenderer *
_cogl_pango_renderer_new (CoglContext *context);
void
_cogl_pango_renderer_clear_glyph_cache (CoglPangoRenderer *renderer);
void
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
gboolean value);
gboolean
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer);
CoglContext *
_cogl_pango_font_map_get_cogl_context (CoglPangoFontMap *fm);
PangoRenderer *
_cogl_pango_font_map_get_renderer (CoglPangoFontMap *fm);
G_END_DECLS

View File

@ -309,7 +309,7 @@ cogl_pango_get_renderer_from_context (PangoContext *context)
cogl_font_map = COGL_PANGO_FONT_MAP (font_map);
renderer = _cogl_pango_font_map_get_renderer (cogl_font_map);
renderer = cogl_pango_font_map_get_renderer (cogl_font_map);
g_return_val_if_fail (COGL_PANGO_IS_RENDERER (renderer), NULL);
@ -480,13 +480,6 @@ cogl_pango_show_layout_line (CoglFramebuffer *fb,
priv->display_list = NULL;
}
void
_cogl_pango_renderer_clear_glyph_cache (CoglPangoRenderer *renderer)
{
cogl_pango_glyph_cache_clear (renderer->mipmap_caches.glyph_cache);
cogl_pango_glyph_cache_clear (renderer->no_mipmap_caches.glyph_cache);
}
void
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
gboolean value)
@ -494,12 +487,6 @@ _cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
renderer->use_mipmapping = value;
}
gboolean
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer)
{
return renderer->use_mipmapping;
}
static CoglPangoGlyphCacheValue *
cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer,
gboolean create,

View File

@ -103,15 +103,6 @@ COGL_EXPORT void
cogl_pango_font_map_set_resolution (CoglPangoFontMap *font_map,
double dpi);
/**
* cogl_pango_font_map_clear_glyph_cache:
* @font_map: a #CoglPangoFontMap
*
* Clears the glyph cache for @font_map.
*/
COGL_EXPORT void
cogl_pango_font_map_clear_glyph_cache (CoglPangoFontMap *font_map);
/**
* cogl_pango_ensure_glyph_cache_for_layout:
* @layout: A #PangoLayout
@ -137,18 +128,6 @@ COGL_EXPORT void
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
gboolean value);
/**
* cogl_pango_font_map_get_use_mipmapping:
* @font_map: a #CoglPangoFontMap
*
* Retrieves whether the [class@CoglPango.Renderer] used by @font_map will use
* mipmapping when rendering the glyphs.
*
* Return value: %TRUE if mipmapping is used, %FALSE otherwise.
*/
COGL_EXPORT gboolean
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *font_map);
/**
* cogl_pango_font_map_get_renderer:
* @font_map: a #CoglPangoFontMap