[mutter/gbsneto/clutter-cleanups: 4/10] clutter/main: Remove ClutterFontFlags and family



commit 7419ab7de5410ab59dd57f6ca8bf6c5a282b9b85
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Jun 30 17:16:41 2019 -0300

    clutter/main: Remove ClutterFontFlags and family
    
    More unused code.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/666

 clutter/clutter/clutter-enums.h           |  18 -----
 clutter/clutter/clutter-main.c            | 108 ------------------------------
 clutter/clutter/deprecated/clutter-main.h |   6 --
 3 files changed, 132 deletions(-)
---
diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h
index 541de58be..c91f4cbad 100644
--- a/clutter/clutter/clutter-enums.h
+++ b/clutter/clutter/clutter-enums.h
@@ -277,24 +277,6 @@ typedef enum
   CLUTTER_ANIMATION_LAST
 } ClutterAnimationMode;
 
-/**
- * ClutterFontFlags:
- * @CLUTTER_FONT_MIPMAPPING: Set to use mipmaps for the glyph cache textures.
- * @CLUTTER_FONT_HINTING: Set to enable hinting on the glyphs.
- *
- * Runtime flags to change the font quality. To be used with
- * clutter_set_font_flags().
- *
- * Since: 1.0
- *
- * Deprecated: 1.22: Use #cairo_font_options_t instead
- */
-typedef enum /*< prefix=CLUTTER_FONT >*/
-{
-  CLUTTER_FONT_MIPMAPPING = (1 << 0),
-  CLUTTER_FONT_HINTING    = (1 << 1)
-} ClutterFontFlags;
-
 /**
  * ClutterTextDirection:
  * @CLUTTER_TEXT_DIRECTION_DEFAULT: Use the default setting, as returned
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index 318a3aa32..7ee3b76e0 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -3017,114 +3017,6 @@ clutter_get_keyboard_grab (void)
   return context->keyboard_grab_actor;
 }
 
-/**
- * clutter_set_font_flags:
- * @flags: The new flags
- *
- * Sets the font quality options for subsequent text rendering
- * operations.
- *
- * Using mipmapped textures will improve the quality for scaled down
- * text but will use more texture memory.
- *
- * Enabling hinting improves text quality for static text but may
- * introduce some artifacts if the text is animated.
- *
- * Since: 1.0
- *
- * Deprecated: 1.10: Use clutter_backend_set_font_options() and the
- *   #cairo_font_option_t API.
- */
-void
-clutter_set_font_flags (ClutterFontFlags flags)
-{
-  CoglPangoFontMap *font_map;
-  ClutterFontFlags old_flags, changed_flags;
-  const cairo_font_options_t *font_options;
-  cairo_font_options_t *new_font_options;
-  cairo_hint_style_t hint_style;
-  gboolean use_mipmapping;
-  ClutterBackend *backend;
-
-  backend = clutter_get_default_backend ();
-  font_map = clutter_context_get_pango_fontmap ();
-  font_options = clutter_backend_get_font_options (backend);
-  old_flags = 0;
-
-  if (cogl_pango_font_map_get_use_mipmapping (font_map))
-    old_flags |= CLUTTER_FONT_MIPMAPPING;
-
-  hint_style = cairo_font_options_get_hint_style (font_options);
-  if (hint_style != CAIRO_HINT_STYLE_DEFAULT &&
-      hint_style != CAIRO_HINT_STYLE_NONE)
-    old_flags |= CLUTTER_FONT_HINTING;
-
-  if (old_flags == flags)
-    return;
-
-  new_font_options = cairo_font_options_copy (font_options);
-
-  /* Only set the font options that have actually changed so we don't
-     override a detailed setting from the backend */
-  changed_flags = old_flags ^ flags;
-
-  if ((changed_flags & CLUTTER_FONT_MIPMAPPING))
-    {
-      use_mipmapping = (changed_flags & CLUTTER_FONT_MIPMAPPING) != 0;
-
-      cogl_pango_font_map_set_use_mipmapping (font_map, use_mipmapping);
-    }
-
-  if ((changed_flags & CLUTTER_FONT_HINTING))
-    {
-      hint_style = (flags & CLUTTER_FONT_HINTING)
-                 ? CAIRO_HINT_STYLE_FULL
-                 : CAIRO_HINT_STYLE_NONE;
-
-      cairo_font_options_set_hint_style (new_font_options, hint_style);
-    }
-
-  clutter_backend_set_font_options (backend, new_font_options);
-
-  cairo_font_options_destroy (new_font_options);
-}
-
-/**
- * clutter_get_font_flags:
- *
- * Gets the current font flags for rendering text. See
- * clutter_set_font_flags().
- *
- * Return value: The font flags
- *
- * Since: 1.0
- *
- * Deprecated: 1.10: Use clutter_backend_get_font_options() and the
- *   #cairo_font_options_t API.
- */
-ClutterFontFlags
-clutter_get_font_flags (void)
-{
-  CoglPangoFontMap *font_map = NULL;
-  const cairo_font_options_t *font_options;
-  ClutterFontFlags flags = 0;
-  cairo_hint_style_t hint_style;
-
-  font_map = clutter_context_get_pango_fontmap ();
-  if (cogl_pango_font_map_get_use_mipmapping (font_map))
-    flags |= CLUTTER_FONT_MIPMAPPING;
-
-  font_options =
-    clutter_backend_get_font_options (clutter_get_default_backend ());
-
-  hint_style = cairo_font_options_get_hint_style (font_options);
-  if (hint_style != CAIRO_HINT_STYLE_DEFAULT &&
-      hint_style != CAIRO_HINT_STYLE_NONE)
-    flags |= CLUTTER_FONT_HINTING;
-
-  return flags;
-}
-
 /**
  * clutter_get_input_device_for_id:
  * @id_: the unique id for a device
diff --git a/clutter/clutter/deprecated/clutter-main.h b/clutter/clutter/deprecated/clutter-main.h
index 5d2f5d350..f6d70f69c 100644
--- a/clutter/clutter/deprecated/clutter-main.h
+++ b/clutter/clutter/deprecated/clutter-main.h
@@ -43,12 +43,6 @@ void                    clutter_threads_leave                   (void);
 CLUTTER_DEPRECATED_FOR(clutter_stage_ensure_redraw)
 void                    clutter_redraw                          (ClutterStage     *stage);
 
-CLUTTER_DEPRECATED_FOR(clutter_backend_set_font_options)
-void                    clutter_set_font_flags                  (ClutterFontFlags  flags);
-
-CLUTTER_DEPRECATED_FOR(clutter_backend_get_font_options)
-ClutterFontFlags        clutter_get_font_flags                  (void);
-
 CLUTTER_DEPRECATED_FOR(clutter_device_manager_get_device)
 ClutterInputDevice *    clutter_get_input_device_for_id         (gint id_);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]