1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
This commit is contained in:
Bilal Elmoussaoui 2024-08-20 18:45:28 +02:00 committed by Marge Bot
parent 5176a828eb
commit 60edafe3eb
5 changed files with 1 additions and 43 deletions

View file

@ -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;

View file

@ -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)
{

View file

@ -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

View file

@ -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,

View file

@ -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