[mutter] cogl: Remove unused _cogl_pipeline_get_layers



commit 985b3b32ceea443fef4138682dcf67d956f189e5
Author: Adam Jackson <ajax redhat com>
Date:   Tue Jan 21 14:36:30 2020 -0500

    cogl: Remove unused _cogl_pipeline_get_layers
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/1015

 cogl/cogl/cogl-pipeline-private.h |  8 --------
 cogl/cogl/cogl-pipeline.c         | 40 ---------------------------------------
 2 files changed, 48 deletions(-)
---
diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h
index 0d66a6a2b..554179316 100644
--- a/cogl/cogl/cogl-pipeline-private.h
+++ b/cogl/cogl/cogl-pipeline-private.h
@@ -333,10 +333,6 @@ struct _CoglPipeline
    * pipelines with only a few layers... */
   CoglPipelineLayer    *short_layers_cache[3];
 
-  /* The deprecated cogl_pipeline_get_layers() API returns a
-   * const GList of layers, which we track here... */
-  GList                *deprecated_get_layers_list;
-
   /* XXX: consider adding an authorities cache to speed up sparse
    * property value lookups:
    * CoglPipeline *authorities_cache[COGL_PIPELINE_N_SPARSE_PROPERTIES];
@@ -372,7 +368,6 @@ struct _CoglPipeline
   unsigned int          unknown_color_alpha:1;
 
   unsigned int          layers_cache_dirty:1;
-  unsigned int          deprecated_get_layers_list_dirty:1;
 
 #ifdef COGL_DEBUG_ENABLED
   /* For debugging purposes it's possible to associate a static const
@@ -791,9 +786,6 @@ _cogl_pipeline_prune_to_n_layers (CoglPipeline *pipeline, int n);
  * API to support the deprecate cogl_pipeline_layer_xyz functions...
  */
 
-const GList *
-_cogl_pipeline_get_layers (CoglPipeline *pipeline);
-
 typedef gboolean (*CoglPipelineInternalLayerCallback) (CoglPipelineLayer *layer,
                                                        void *user_data);
 
diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c
index 5f6f6695f..3b911b83f 100644
--- a/cogl/cogl/cogl-pipeline.c
+++ b/cogl/cogl/cogl-pipeline.c
@@ -280,8 +280,6 @@ _cogl_pipeline_copy (CoglPipeline *src, gboolean is_weak)
    */
 
   pipeline->layers_cache_dirty = TRUE;
-  pipeline->deprecated_get_layers_list = NULL;
-  pipeline->deprecated_get_layers_list_dirty = TRUE;
 
   pipeline->has_static_breadcrumb = FALSE;
 
@@ -397,8 +395,6 @@ _cogl_pipeline_free (CoglPipeline *pipeline)
   if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
     g_slice_free (CoglPipelineBigState, pipeline->big_state);
 
-  g_list_free (pipeline->deprecated_get_layers_list);
-
   recursively_free_layer_caches (pipeline);
 
   g_slice_free (CoglPipeline, pipeline);
@@ -2295,42 +2291,6 @@ cogl_pipeline_remove_layer (CoglPipeline *pipeline, int layer_index)
   pipeline->dirty_real_blend_enable = TRUE;
 }
 
-static gboolean
-prepend_layer_to_list_cb (CoglPipelineLayer *layer,
-                          void *user_data)
-{
-  GList **layers = user_data;
-
-  *layers = g_list_prepend (*layers, layer);
-  return TRUE;
-}
-
-/* TODO: deprecate this API and replace it with
- * cogl_pipeline_foreach_layer
- * TODO: update the docs to note that if the user modifies any layers
- * then the list may become invalid.
- */
-const GList *
-_cogl_pipeline_get_layers (CoglPipeline *pipeline)
-{
-  g_return_val_if_fail (cogl_is_pipeline (pipeline), NULL);
-
-  if (!pipeline->deprecated_get_layers_list_dirty)
-    g_list_free (pipeline->deprecated_get_layers_list);
-
-  pipeline->deprecated_get_layers_list = NULL;
-
-  _cogl_pipeline_foreach_layer_internal (pipeline,
-                                         prepend_layer_to_list_cb,
-                                         &pipeline->deprecated_get_layers_list);
-  pipeline->deprecated_get_layers_list =
-    g_list_reverse (pipeline->deprecated_get_layers_list);
-
-  pipeline->deprecated_get_layers_list_dirty = 0;
-
-  return pipeline->deprecated_get_layers_list;
-}
-
 int
 cogl_pipeline_get_n_layers (CoglPipeline *pipeline)
 {


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