From 1ad3d265e3794a525bd1719adda4adeb01a12df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 12 Dec 2022 16:18:09 +0100 Subject: [PATCH] cogl/pipeline: Rename and export cogl_pipeline_get_layer_filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For symmetry with cogl_pipeline_set_layer_filters. Suggested by Jonas Ådahl. v2: * Align function parameters. (Jonas Ådahl) Part-of: --- cogl/cogl/cogl-pipeline-layer-private.h | 6 ------ cogl/cogl/cogl-pipeline-layer-state.c | 8 ++++---- cogl/cogl/cogl-pipeline-layer-state.h | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cogl/cogl/cogl-pipeline-layer-private.h b/cogl/cogl/cogl-pipeline-layer-private.h index 461a45519..c89e80e21 100644 --- a/cogl/cogl/cogl-pipeline-layer-private.h +++ b/cogl/cogl/cogl-pipeline-layer-private.h @@ -317,12 +317,6 @@ _cogl_pipeline_layer_get_filters (CoglPipelineLayer *layer, const CoglSamplerCacheEntry * _cogl_pipeline_layer_get_sampler_state (CoglPipelineLayer *layer); -void -_cogl_pipeline_get_layer_filters (CoglPipeline *pipeline, - int layer_index, - CoglPipelineFilter *min_filter, - CoglPipelineFilter *mag_filter); - typedef enum { COGL_PIPELINE_LAYER_TYPE_TEXTURE diff --git a/cogl/cogl/cogl-pipeline-layer-state.c b/cogl/cogl/cogl-pipeline-layer-state.c index a56b89c19..66d64196a 100644 --- a/cogl/cogl/cogl-pipeline-layer-state.c +++ b/cogl/cogl/cogl-pipeline-layer-state.c @@ -1247,10 +1247,10 @@ _cogl_pipeline_layer_get_filters (CoglPipelineLayer *layer, } void -_cogl_pipeline_get_layer_filters (CoglPipeline *pipeline, - int layer_index, - CoglPipelineFilter *min_filter, - CoglPipelineFilter *mag_filter) +cogl_pipeline_get_layer_filters (CoglPipeline *pipeline, + int layer_index, + CoglPipelineFilter *min_filter, + CoglPipelineFilter *mag_filter) { CoglPipelineLayer *layer; CoglPipelineLayer *authority; diff --git a/cogl/cogl/cogl-pipeline-layer-state.h b/cogl/cogl/cogl-pipeline-layer-state.h index a8ce9b858..c7b068464 100644 --- a/cogl/cogl/cogl-pipeline-layer-state.h +++ b/cogl/cogl/cogl-pipeline-layer-state.h @@ -327,6 +327,22 @@ cogl_pipeline_set_layer_matrix (CoglPipeline *pipeline, COGL_EXPORT int cogl_pipeline_get_n_layers (CoglPipeline *pipeline); +/** + * cogl_pipeline_get_layer_filters: + * @pipeline: A #CoglPipeline object + * @layer_index: the layer number to change. + * @min_filter: Return location for the filter used when scaling a texture down. + * @mag_filter: Return location for the filter used when magnifying a texture. + * + * Returns the decimation and interpolation filters used when a texture is + * drawn at other scales than 100%. + */ +COGL_EXPORT void +cogl_pipeline_get_layer_filters (CoglPipeline *pipeline, + int layer_index, + CoglPipelineFilter *min_filter, + CoglPipelineFilter *mag_filter); + /** * cogl_pipeline_set_layer_filters: * @pipeline: A #CoglPipeline object