mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
cogl: Remove unused _cogl_pipeline_get_layers
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1015
This commit is contained in:
parent
795491c80a
commit
985b3b32ce
@ -333,10 +333,6 @@ struct _CoglPipeline
|
|||||||
* pipelines with only a few layers... */
|
* pipelines with only a few layers... */
|
||||||
CoglPipelineLayer *short_layers_cache[3];
|
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
|
/* XXX: consider adding an authorities cache to speed up sparse
|
||||||
* property value lookups:
|
* property value lookups:
|
||||||
* CoglPipeline *authorities_cache[COGL_PIPELINE_N_SPARSE_PROPERTIES];
|
* CoglPipeline *authorities_cache[COGL_PIPELINE_N_SPARSE_PROPERTIES];
|
||||||
@ -372,7 +368,6 @@ struct _CoglPipeline
|
|||||||
unsigned int unknown_color_alpha:1;
|
unsigned int unknown_color_alpha:1;
|
||||||
|
|
||||||
unsigned int layers_cache_dirty:1;
|
unsigned int layers_cache_dirty:1;
|
||||||
unsigned int deprecated_get_layers_list_dirty:1;
|
|
||||||
|
|
||||||
#ifdef COGL_DEBUG_ENABLED
|
#ifdef COGL_DEBUG_ENABLED
|
||||||
/* For debugging purposes it's possible to associate a static const
|
/* 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...
|
* API to support the deprecate cogl_pipeline_layer_xyz functions...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const GList *
|
|
||||||
_cogl_pipeline_get_layers (CoglPipeline *pipeline);
|
|
||||||
|
|
||||||
typedef gboolean (*CoglPipelineInternalLayerCallback) (CoglPipelineLayer *layer,
|
typedef gboolean (*CoglPipelineInternalLayerCallback) (CoglPipelineLayer *layer,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
|
@ -280,8 +280,6 @@ _cogl_pipeline_copy (CoglPipeline *src, gboolean is_weak)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
pipeline->layers_cache_dirty = TRUE;
|
pipeline->layers_cache_dirty = TRUE;
|
||||||
pipeline->deprecated_get_layers_list = NULL;
|
|
||||||
pipeline->deprecated_get_layers_list_dirty = TRUE;
|
|
||||||
|
|
||||||
pipeline->has_static_breadcrumb = FALSE;
|
pipeline->has_static_breadcrumb = FALSE;
|
||||||
|
|
||||||
@ -397,8 +395,6 @@ _cogl_pipeline_free (CoglPipeline *pipeline)
|
|||||||
if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
|
if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
|
||||||
g_slice_free (CoglPipelineBigState, pipeline->big_state);
|
g_slice_free (CoglPipelineBigState, pipeline->big_state);
|
||||||
|
|
||||||
g_list_free (pipeline->deprecated_get_layers_list);
|
|
||||||
|
|
||||||
recursively_free_layer_caches (pipeline);
|
recursively_free_layer_caches (pipeline);
|
||||||
|
|
||||||
g_slice_free (CoglPipeline, 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;
|
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
|
int
|
||||||
cogl_pipeline_get_n_layers (CoglPipeline *pipeline)
|
cogl_pipeline_get_n_layers (CoglPipeline *pipeline)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user