From 60edafe3ebe56b46f561599f7602c3867fd7729a Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 20 Aug 2024 18:45:28 +0200 Subject: [PATCH] cogl/pango: Drop mipmapping API/env variables As GNOME Shell always sets that to FALSE anyways This does not drop the separate caching whether the mipmapping is disabled or not, in case shell wants to make use of that in the future Part-of: --- clutter/clutter/clutter-context.c | 9 --------- cogl/cogl-pango/cogl-pango-fontmap.c | 10 ---------- cogl/cogl-pango/cogl-pango-private.h | 4 ---- cogl/cogl-pango/cogl-pango-render.c | 9 +-------- cogl/cogl-pango/cogl-pango.h | 12 ------------ 5 files changed, 1 insertion(+), 43 deletions(-) diff --git a/clutter/clutter/clutter-context.c b/clutter/clutter/clutter-context.c index 0a9ebd0b8..02ee1f8df 100644 --- a/clutter/clutter/clutter-context.c +++ b/clutter/clutter/clutter-context.c @@ -31,7 +31,6 @@ #include "clutter/clutter-paint-node-private.h" #include "clutter/clutter-settings-private.h" -static gboolean clutter_disable_mipmap_text = FALSE; static gboolean clutter_show_fps = FALSE; static gboolean clutter_enable_accessibility = TRUE; @@ -252,10 +251,6 @@ init_clutter_debug (ClutterContext *context) env_string = g_getenv ("CLUTTER_DISABLE_ACCESSIBILITY"); if (env_string) clutter_enable_accessibility = FALSE; - - env_string = g_getenv ("CLUTTER_DISABLE_MIPMAPPED_TEXT"); - if (env_string) - clutter_disable_mipmap_text = TRUE; } ClutterContext * @@ -312,7 +307,6 @@ clutter_context_get_pango_fontmap (ClutterContext *context) { CoglPangoFontMap *font_map; gdouble resolution; - gboolean use_mipmapping; ClutterBackend *backend; CoglContext *cogl_context; @@ -326,9 +320,6 @@ clutter_context_get_pango_fontmap (ClutterContext *context) resolution = clutter_backend_get_resolution (context->backend); cogl_pango_font_map_set_resolution (font_map, resolution); - use_mipmapping = !clutter_disable_mipmap_text; - cogl_pango_font_map_set_use_mipmapping (font_map, use_mipmapping); - context->font_map = font_map; return context->font_map; diff --git a/cogl/cogl-pango/cogl-pango-fontmap.c b/cogl/cogl-pango/cogl-pango-fontmap.c index 4d089c242..eeddd2b3c 100644 --- a/cogl/cogl-pango/cogl-pango-fontmap.c +++ b/cogl/cogl-pango/cogl-pango-fontmap.c @@ -102,16 +102,6 @@ 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_set_use_mipmapping (CoglPangoFontMap *fm, - gboolean value) -{ - PangoRenderer *renderer = cogl_pango_font_map_get_renderer (fm); - - _cogl_pango_renderer_set_use_mipmapping (COGL_PANGO_RENDERER (renderer), - value); -} - static GQuark cogl_pango_font_map_get_priv_key (void) { diff --git a/cogl/cogl-pango/cogl-pango-private.h b/cogl/cogl-pango/cogl-pango-private.h index 99c5ebd24..e04537601 100644 --- a/cogl/cogl-pango/cogl-pango-private.h +++ b/cogl/cogl-pango/cogl-pango-private.h @@ -42,8 +42,4 @@ G_BEGIN_DECLS PangoRenderer * _cogl_pango_renderer_new (CoglContext *context); -void -_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer, - gboolean value); - G_END_DECLS diff --git a/cogl/cogl-pango/cogl-pango-render.c b/cogl/cogl-pango/cogl-pango-render.c index 383588a4c..a5f963537 100644 --- a/cogl/cogl-pango/cogl-pango-render.c +++ b/cogl/cogl-pango/cogl-pango-render.c @@ -223,7 +223,7 @@ _cogl_pango_renderer_constructed (GObject *gobject) renderer->mipmap_caches.glyph_cache = cogl_pango_glyph_cache_new (ctx, TRUE); - _cogl_pango_renderer_set_use_mipmapping (renderer, FALSE); + renderer->use_mipmapping = FALSE; if (G_OBJECT_CLASS (cogl_pango_renderer_parent_class)->constructed) G_OBJECT_CLASS (cogl_pango_renderer_parent_class)->constructed (gobject); @@ -487,13 +487,6 @@ cogl_pango_show_layout_line (CoglFramebuffer *fb, priv->display_list = NULL; } -void -_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer, - gboolean value) -{ - renderer->use_mipmapping = value; -} - static CoglPangoGlyphCacheValue * cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer, gboolean create, diff --git a/cogl/cogl-pango/cogl-pango.h b/cogl/cogl-pango/cogl-pango.h index 354f9013e..05f4c6305 100644 --- a/cogl/cogl-pango/cogl-pango.h +++ b/cogl/cogl-pango/cogl-pango.h @@ -119,18 +119,6 @@ cogl_pango_font_map_set_resolution (CoglPangoFontMap *font_map, COGL_EXPORT void cogl_pango_ensure_glyph_cache_for_layout (PangoLayout *layout); -/** - * cogl_pango_font_map_set_use_mipmapping: - * @font_map: a #CoglPangoFontMap - * @value: %TRUE to enable the use of mipmapping - * - * Sets whether the renderer for the passed font map should use - * mipmapping when rendering a [class@Pango.Layout]. - */ -COGL_EXPORT void -cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map, - gboolean value); - /** * cogl_pango_font_map_get_renderer: * @font_map: a #CoglPangoFontMap