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>
This commit is contained in:
Michel Dänzer 2022-12-12 16:18:09 +01:00 committed by Marge Bot
parent 1f65ab4be1
commit 1ad3d265e3
3 changed files with 20 additions and 10 deletions

View File

@ -317,12 +317,6 @@ _cogl_pipeline_layer_get_filters (CoglPipelineLayer *layer,
const CoglSamplerCacheEntry * const CoglSamplerCacheEntry *
_cogl_pipeline_layer_get_sampler_state (CoglPipelineLayer *layer); _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 typedef enum
{ {
COGL_PIPELINE_LAYER_TYPE_TEXTURE COGL_PIPELINE_LAYER_TYPE_TEXTURE

View File

@ -1247,10 +1247,10 @@ _cogl_pipeline_layer_get_filters (CoglPipelineLayer *layer,
} }
void void
_cogl_pipeline_get_layer_filters (CoglPipeline *pipeline, cogl_pipeline_get_layer_filters (CoglPipeline *pipeline,
int layer_index, int layer_index,
CoglPipelineFilter *min_filter, CoglPipelineFilter *min_filter,
CoglPipelineFilter *mag_filter) CoglPipelineFilter *mag_filter)
{ {
CoglPipelineLayer *layer; CoglPipelineLayer *layer;
CoglPipelineLayer *authority; CoglPipelineLayer *authority;

View File

@ -327,6 +327,22 @@ cogl_pipeline_set_layer_matrix (CoglPipeline *pipeline,
COGL_EXPORT int COGL_EXPORT int
cogl_pipeline_get_n_layers (CoglPipeline *pipeline); 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: * cogl_pipeline_set_layer_filters:
* @pipeline: A #CoglPipeline object * @pipeline: A #CoglPipeline object