[mutter/wip/carlosg/clip-regions: 7/7] clutter: Drop unused API



commit 4988983f022ceaa36b2c101aadc300c307932739
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Oct 20 13:38:28 2019 +0200

    clutter: Drop unused API
    
    clutter_stage_*_get_clip_region_bounds() is no longer used and may be
    removed.

 clutter/clutter/clutter-stage-window.c | 17 -----------------
 clutter/clutter/clutter-stage-window.h |  2 --
 clutter/clutter/clutter-stage.c        | 35 ----------------------------------
 clutter/clutter/clutter-stage.h        |  3 ---
 4 files changed, 57 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage-window.c b/clutter/clutter/clutter-stage-window.c
index c859264b3..68a763d44 100644
--- a/clutter/clutter/clutter-stage-window.c
+++ b/clutter/clutter/clutter-stage-window.c
@@ -249,23 +249,6 @@ _clutter_stage_window_get_redraw_clip (ClutterStageWindow *window)
   return NULL;
 }
 
-gboolean
-_clutter_stage_window_get_redraw_clip_bounds (ClutterStageWindow    *window,
-                                              cairo_rectangle_int_t *stage_clip)
-{
-  cairo_region_t *redraw_clip;
-
-  g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
-
-  redraw_clip = _clutter_stage_window_get_redraw_clip (window);
-  if (!redraw_clip)
-    return FALSE;
-
-  cairo_region_get_extents (redraw_clip, stage_clip);
-  cairo_region_destroy (redraw_clip);
-  return TRUE;
-}
-
 void
 _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
                                         gboolean            accept_focus)
diff --git a/clutter/clutter/clutter-stage-window.h b/clutter/clutter/clutter-stage-window.h
index a06c5190d..c99e9594d 100644
--- a/clutter/clutter/clutter-stage-window.h
+++ b/clutter/clutter/clutter-stage-window.h
@@ -98,8 +98,6 @@ void              _clutter_stage_window_add_redraw_clip         (ClutterStageWin
                                                                  cairo_rectangle_int_t *stage_clip);
 gboolean          _clutter_stage_window_has_redraw_clips        (ClutterStageWindow    *window);
 gboolean          _clutter_stage_window_ignoring_redraw_clips   (ClutterStageWindow    *window);
-gboolean          _clutter_stage_window_get_redraw_clip_bounds  (ClutterStageWindow    *window,
-                                                                 cairo_rectangle_int_t *clip);
 cairo_region_t *  _clutter_stage_window_get_redraw_clip         (ClutterStageWindow    *window);
 
 void              _clutter_stage_window_set_accept_focus        (ClutterStageWindow *window,
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 5e3364162..cbbc6cd79 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1655,41 +1655,6 @@ clutter_stage_get_redraw_clip (ClutterStage *stage)
   return cairo_region_create_rectangle (&clip);
 }
 
-/**
- * clutter_stage_get_redraw_clip_bounds:
- * @stage: A #ClutterStage
- * @clip: (out caller-allocates): Return location for the clip bounds
- *
- * Gets the bounds of the current redraw for @stage in stage pixel
- * coordinates. E.g., if only a single actor has queued a redraw then
- * Clutter may redraw the stage with a clip so that it doesn't have to
- * paint every pixel in the stage. This function would then return the
- * bounds of that clip. An application can use this information to
- * avoid some extra work if it knows that some regions of the stage
- * aren't going to be painted. This should only be called while the
- * stage is being painted. If there is no current redraw clip then
- * this function will set @clip to the full extents of the stage.
- *
- * Since: 1.8
- */
-void
-clutter_stage_get_redraw_clip_bounds (ClutterStage          *stage,
-                                      cairo_rectangle_int_t *clip)
-{
-  ClutterStagePrivate *priv;
-
-  g_return_if_fail (CLUTTER_IS_STAGE (stage));
-  g_return_if_fail (clip != NULL);
-
-  priv = stage->priv;
-
-  if (!_clutter_stage_window_get_redraw_clip_bounds (priv->impl, clip))
-    {
-      /* Set clip to the full extents of the stage */
-      _clutter_stage_window_get_geometry (priv->impl, clip);
-    }
-}
-
 static ClutterActor *
 _clutter_stage_do_pick_on_view (ClutterStage     *stage,
                                 float             x,
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index f40ce8164..dd8de9187 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -211,9 +211,6 @@ guchar *        clutter_stage_read_pixels                       (ClutterStage
                                                                  gint                   height);
 
 CLUTTER_EXPORT
-void            clutter_stage_get_redraw_clip_bounds            (ClutterStage          *stage,
-                                                                 cairo_rectangle_int_t *clip);
-CLUTTER_EXPORT
 cairo_region_t * clutter_stage_get_redraw_clip                  (ClutterStage          *stage);
 CLUTTER_EXPORT
 void            clutter_stage_ensure_viewport                   (ClutterStage          *stage);


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