From 5d9e9707dde55c2f179d40337ccf2fc03bfc083d Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Sat, 2 Dec 2023 11:23:06 +0100 Subject: [PATCH] cogl: Remove unused CoglPipelineEvalFlags Part-of: --- cogl/cogl/cogl-journal.c | 6 ++---- cogl/cogl/cogl-pipeline-hash-table.c | 6 ++---- cogl/cogl/cogl-pipeline-layer-private.h | 3 +-- cogl/cogl/cogl-pipeline-layer-state-private.h | 3 +-- cogl/cogl/cogl-pipeline-layer-state.c | 3 +-- cogl/cogl/cogl-pipeline-layer.c | 6 ++---- cogl/cogl/cogl-pipeline-private.h | 7 ++----- cogl/cogl/cogl-pipeline.c | 16 +++++----------- cogl/cogl/cogl-private.h | 8 -------- 9 files changed, 16 insertions(+), 42 deletions(-) diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c index cb7ed88fa..6ea5d68d7 100644 --- a/cogl/cogl/cogl-journal.c +++ b/cogl/cogl/cogl-journal.c @@ -446,8 +446,7 @@ compare_entry_pipelines (CoglJournalEntry *entry0, CoglJournalEntry *entry1) entry1->pipeline, (COGL_PIPELINE_STATE_ALL & ~COGL_PIPELINE_STATE_COLOR), - COGL_PIPELINE_LAYER_STATE_ALL, - 0)) + COGL_PIPELINE_LAYER_STATE_ALL)) return TRUE; else return FALSE; @@ -1883,8 +1882,7 @@ _cogl_journal_try_read_pixel (CoglJournal *journal, if (!_cogl_pipeline_equal (ctx->opaque_color_pipeline, entry->pipeline, (COGL_PIPELINE_STATE_ALL & ~COGL_PIPELINE_STATE_COLOR), - COGL_PIPELINE_LAYER_STATE_ALL, - 0)) + COGL_PIPELINE_LAYER_STATE_ALL)) return FALSE; diff --git a/cogl/cogl/cogl-pipeline-hash-table.c b/cogl/cogl/cogl-pipeline-hash-table.c index 6ef29606d..e57dfbfb9 100644 --- a/cogl/cogl/cogl-pipeline-hash-table.c +++ b/cogl/cogl/cogl-pipeline-hash-table.c @@ -88,8 +88,7 @@ entry_equal (const void *a, return _cogl_pipeline_equal (entry_a->parent.pipeline, entry_b->parent.pipeline, hash->main_state, - hash->layer_state, - 0); + hash->layer_state); } void @@ -185,8 +184,7 @@ _cogl_pipeline_hash_table_get (CoglPipelineHashTable *hash, dummy_entry.hash = hash; dummy_entry.hash_value = _cogl_pipeline_hash (key_pipeline, hash->main_state, - hash->layer_state, - 0); + hash->layer_state); entry = g_hash_table_lookup (hash->table, &dummy_entry); if (entry) diff --git a/cogl/cogl/cogl-pipeline-layer-private.h b/cogl/cogl/cogl-pipeline-layer-private.h index b2e2d504d..a24603c8e 100644 --- a/cogl/cogl/cogl-pipeline-layer-private.h +++ b/cogl/cogl/cogl-pipeline-layer-private.h @@ -296,8 +296,7 @@ _cogl_pipeline_layer_resolve_authorities (CoglPipelineLayer *layer, gboolean _cogl_pipeline_layer_equal (CoglPipelineLayer *layer0, CoglPipelineLayer *layer1, - unsigned long differences_mask, - CoglPipelineEvalFlags flags); + unsigned long differences_mask); CoglPipelineLayer * _cogl_pipeline_layer_pre_change_notify (CoglPipeline *required_owner, diff --git a/cogl/cogl/cogl-pipeline-layer-state-private.h b/cogl/cogl/cogl-pipeline-layer-state-private.h index 96da08d3d..17652de08 100644 --- a/cogl/cogl/cogl-pipeline-layer-state-private.h +++ b/cogl/cogl/cogl-pipeline-layer-state-private.h @@ -43,8 +43,7 @@ _cogl_pipeline_set_layer_unit (CoglPipeline *required_owner, gboolean _cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0, - CoglPipelineLayer *authority1, - CoglPipelineEvalFlags flags); + CoglPipelineLayer *authority1); gboolean _cogl_pipeline_layer_combine_state_equal (CoglPipelineLayer *authority0, diff --git a/cogl/cogl/cogl-pipeline-layer-state.c b/cogl/cogl/cogl-pipeline-layer-state.c index e30961bf3..05712fcb6 100644 --- a/cogl/cogl/cogl-pipeline-layer-state.c +++ b/cogl/cogl/cogl-pipeline-layer-state.c @@ -691,8 +691,7 @@ cogl_pipeline_add_layer_snippet (CoglPipeline *pipeline, gboolean _cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0, - CoglPipelineLayer *authority1, - CoglPipelineEvalFlags flags) + CoglPipelineLayer *authority1) { if (authority0->texture == NULL) { diff --git a/cogl/cogl/cogl-pipeline-layer.c b/cogl/cogl/cogl-pipeline-layer.c index c9894db6a..6586ee102 100644 --- a/cogl/cogl/cogl-pipeline-layer.c +++ b/cogl/cogl/cogl-pipeline-layer.c @@ -636,8 +636,7 @@ _cogl_pipeline_layer_resolve_authorities (CoglPipelineLayer *layer, gboolean _cogl_pipeline_layer_equal (CoglPipelineLayer *layer0, CoglPipelineLayer *layer1, - unsigned long differences_mask, - CoglPipelineEvalFlags flags) + unsigned long differences_mask) { unsigned long layers_difference; CoglPipelineLayer *authorities0[COGL_PIPELINE_LAYER_STATE_SPARSE_COUNT]; @@ -664,8 +663,7 @@ _cogl_pipeline_layer_equal (CoglPipelineLayer *layer0, CoglPipelineLayerStateIndex state_index = COGL_PIPELINE_LAYER_STATE_TEXTURE_DATA_INDEX; if (!_cogl_pipeline_layer_texture_data_equal (authorities0[state_index], - authorities1[state_index], - flags)) + authorities1[state_index])) return FALSE; } diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h index 0ed9539e0..946d3f152 100644 --- a/cogl/cogl/cogl-pipeline-private.h +++ b/cogl/cogl/cogl-pipeline-private.h @@ -228,7 +228,6 @@ typedef struct typedef struct _CoglPipelineHashState { unsigned long layer_differences; - CoglPipelineEvalFlags flags; unsigned int hash; } CoglPipelineHashState; @@ -700,14 +699,12 @@ gboolean _cogl_pipeline_equal (CoglPipeline *pipeline0, CoglPipeline *pipeline1, unsigned int differences, - unsigned long layer_differences, - CoglPipelineEvalFlags flags); + unsigned long layer_differences); unsigned int _cogl_pipeline_hash (CoglPipeline *pipeline, unsigned int differences, - unsigned long layer_differences, - CoglPipelineEvalFlags flags); + unsigned long layer_differences); /* Makes a copy of the given pipeline that is a child of the root * pipeline rather than a child of the source pipeline. That way the diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c index 5e724d04f..1104d03bd 100644 --- a/cogl/cogl/cogl-pipeline.c +++ b/cogl/cogl/cogl-pipeline.c @@ -1846,8 +1846,7 @@ _cogl_pipeline_apply_overrides (CoglPipeline *pipeline, static gboolean _cogl_pipeline_layers_equal (CoglPipeline *authority0, CoglPipeline *authority1, - unsigned long differences, - CoglPipelineEvalFlags flags) + unsigned long differences) { int i; @@ -1861,8 +1860,7 @@ _cogl_pipeline_layers_equal (CoglPipeline *authority0, { if (!_cogl_pipeline_layer_equal (authority0->layers_cache[i], authority1->layers_cache[i], - differences, - flags)) + differences)) return FALSE; } return TRUE; @@ -2008,8 +2006,7 @@ gboolean _cogl_pipeline_equal (CoglPipeline *pipeline0, CoglPipeline *pipeline1, unsigned int differences, - unsigned long layer_differences, - CoglPipelineEvalFlags flags) + unsigned long layer_differences) { unsigned long pipelines_difference; CoglPipeline *authorities0[COGL_PIPELINE_STATE_SPARSE_COUNT]; @@ -2140,8 +2137,7 @@ _cogl_pipeline_equal (CoglPipeline *pipeline0, { if (!_cogl_pipeline_layers_equal (authorities0[bit], authorities1[bit], - layer_differences, - flags)) + layer_differences)) goto done; break; } @@ -2492,8 +2488,7 @@ _cogl_pipeline_init_state_hash_functions (void) unsigned int _cogl_pipeline_hash (CoglPipeline *pipeline, unsigned int differences, - unsigned long layer_differences, - CoglPipelineEvalFlags flags) + unsigned long layer_differences) { CoglPipeline *authorities[COGL_PIPELINE_STATE_SPARSE_COUNT]; unsigned int mask; @@ -2503,7 +2498,6 @@ _cogl_pipeline_hash (CoglPipeline *pipeline, state.hash = 0; state.layer_differences = layer_differences; - state.flags = flags; _cogl_pipeline_update_real_blend_enable (pipeline, FALSE); diff --git a/cogl/cogl/cogl-private.h b/cogl/cogl/cogl-private.h index 7fcf7b087..fb18c8b9f 100644 --- a/cogl/cogl/cogl-private.h +++ b/cogl/cogl/cogl-private.h @@ -72,14 +72,6 @@ typedef enum COGL_N_PRIVATE_FEATURES } CoglPrivateFeature; -/* Sometimes when evaluating pipelines, either during comparisons or - * if calculating a hash value we need to tweak the evaluation - * semantics */ -typedef enum _CoglPipelineEvalFlags -{ - COGL_PIPELINE_EVAL_FLAG_NONE = 0 -} CoglPipelineEvalFlags; - void _cogl_transform_point (const graphene_matrix_t *matrix_mv, const graphene_matrix_t *matrix_p,