diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2022-12-12 16:18:09 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-12-15 11:54:21 +0000 |
commit | 1ad3d265e3794a525bd1719adda4adeb01a12df5 (patch) | |
tree | 810f20a7d4a3e96c4d517286330ccd436b22e104 | |
parent | 1f65ab4be1b9cb0985d56d92205dad3ea0107259 (diff) | |
download | mutter-1ad3d265e3794a525bd1719adda4adeb01a12df5.tar.gz |
cogl/pipeline: Rename and export cogl_pipeline_get_layer_filters
For symmetry with cogl_pipeline_set_layer_filters.
Suggested by Jonas Ådahl.
v2:
* Align function parameters. (Jonas Ådahl)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2757>
-rw-r--r-- | cogl/cogl/cogl-pipeline-layer-private.h | 6 | ||||
-rw-r--r-- | cogl/cogl/cogl-pipeline-layer-state.c | 8 | ||||
-rw-r--r-- | 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 @@ -328,6 +328,22 @@ 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 * @layer_index: the layer number to change. |