From 1f65ab4be1b9cb0985d56d92205dad3ea0107259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 12 Dec 2022 10:46:57 +0100 Subject: [PATCH] cogl/pipeline: Remove cogl_pipeline_get_layer_min/mag_filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unused since https://gitlab.gnome.org/GNOME/mutter/merge_requests/932 AFAICT. As a bonus, gets rid of these compiler warnings: ../cogl/cogl/cogl-pipeline-layer-state.c: In function ‘cogl_pipeline_get_layer_min_filter’: ../cogl/cogl/cogl-pipeline-layer-state.c:1279:10: warning: ‘min_filter’ may be used uninitialized [-Wmaybe-uninitialized] 1279 | return min_filter; | ^~~~~~~~~~ ../cogl/cogl/cogl-pipeline-layer-state.c:1274:22: note: ‘min_filter’ was declared here 1274 | CoglPipelineFilter min_filter; | ^~~~~~~~~~ ../cogl/cogl/cogl-pipeline-layer-state.c: In function ‘cogl_pipeline_get_layer_mag_filter’: ../cogl/cogl/cogl-pipeline-layer-state.c:1291:10: warning: ‘mag_filter’ may be used uninitialized [-Wmaybe-uninitialized] 1291 | return mag_filter; | ^~~~~~~~~~ ../cogl/cogl/cogl-pipeline-layer-state.c:1287:22: note: ‘mag_filter’ was declared here 1287 | CoglPipelineFilter mag_filter; | ^~~~~~~~~~ Part-of: --- cogl/cogl/cogl-pipeline-layer-state.c | 24 ----------------- cogl/cogl/cogl-pipeline-layer-state.h | 38 --------------------------- 2 files changed, 62 deletions(-) diff --git a/cogl/cogl/cogl-pipeline-layer-state.c b/cogl/cogl/cogl-pipeline-layer-state.c index b2503148d..a56b89c19 100644 --- a/cogl/cogl/cogl-pipeline-layer-state.c +++ b/cogl/cogl/cogl-pipeline-layer-state.c @@ -1267,30 +1267,6 @@ _cogl_pipeline_get_layer_filters (CoglPipeline *pipeline, *mag_filter = authority->sampler_cache_entry->mag_filter; } -CoglPipelineFilter -cogl_pipeline_get_layer_min_filter (CoglPipeline *pipeline, - int layer_index) -{ - CoglPipelineFilter min_filter; - CoglPipelineFilter mag_filter; - - _cogl_pipeline_get_layer_filters (pipeline, layer_index, - &min_filter, &mag_filter); - return min_filter; -} - -CoglPipelineFilter -cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline, - int layer_index) -{ - CoglPipelineFilter min_filter; - CoglPipelineFilter mag_filter; - - _cogl_pipeline_get_layer_filters (pipeline, layer_index, - &min_filter, &mag_filter); - return mag_filter; -} - CoglPipelineFilter _cogl_pipeline_layer_get_min_filter (CoglPipelineLayer *layer) { diff --git a/cogl/cogl/cogl-pipeline-layer-state.h b/cogl/cogl/cogl-pipeline-layer-state.h index b1773a560..a8ce9b858 100644 --- a/cogl/cogl/cogl-pipeline-layer-state.h +++ b/cogl/cogl/cogl-pipeline-layer-state.h @@ -348,44 +348,6 @@ cogl_pipeline_set_layer_filters (CoglPipeline *pipeline, CoglPipelineFilter min_filter, CoglPipelineFilter mag_filter); -/** - * cogl_pipeline_get_layer_min_filter: - * @pipeline: A #CoglPipeline object - * @layer_index: the layer number to change. - * - * Retrieves the currently set minification #CoglPipelineFilter set on - * the specified layer. The miniifcation filter determines how the - * layer should be sampled when down-scaled. - * - * The default filter is %COGL_PIPELINE_FILTER_LINEAR but this can be - * changed using cogl_pipeline_set_layer_filters(). - * - * Return value: The minification #CoglPipelineFilter for the - * specified layer. - */ -COGL_EXPORT CoglPipelineFilter -cogl_pipeline_get_layer_min_filter (CoglPipeline *pipeline, - int layer_index); - -/** - * cogl_pipeline_get_layer_mag_filter: - * @pipeline: A #CoglPipeline object - * @layer_index: the layer number to change. - * - * Retrieves the currently set magnification #CoglPipelineFilter set on - * the specified layer. The magnification filter determines how the - * layer should be sampled when up-scaled. - * - * The default filter is %COGL_PIPELINE_FILTER_LINEAR but this can be - * changed using cogl_pipeline_set_layer_filters(). - * - * Return value: The magnification #CoglPipelineFilter for the - * specified layer. - */ -COGL_EXPORT CoglPipelineFilter -cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline, - int layer_index); - /** * cogl_pipeline_set_layer_point_sprite_coords_enabled: * @pipeline: A #CoglPipeline object