mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
cogl-pipeline: Add internal API to get the layer matrix
This returns the layer matrix given a pipeline and a layer index. The API is kept as internal because it directly returns a pointer into the layer private data to avoid a copy into an out-param. We might also want to add a public function which does the copy.
This commit is contained in:
parent
e38e9e0355
commit
566831de66
@ -1044,6 +1044,10 @@ CoglPipelineFilter
|
|||||||
_cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline,
|
_cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline,
|
||||||
int layer_index);
|
int layer_index);
|
||||||
|
|
||||||
|
const CoglMatrix *
|
||||||
|
_cogl_pipeline_get_layer_matrix (CoglPipeline *pipeline,
|
||||||
|
int layer_index);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pipeline_texture_storage_change_notify (CoglHandle texture);
|
_cogl_pipeline_texture_storage_change_notify (CoglHandle texture);
|
||||||
|
|
||||||
|
@ -5141,6 +5141,25 @@ _cogl_pipeline_get_layer_combine_constant (CoglPipeline *pipeline,
|
|||||||
sizeof (float) * 4);
|
sizeof (float) * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We should probably make a public API version of this that has a
|
||||||
|
matrix out-param. For an internal API it's good to be able to avoid
|
||||||
|
copying the matrix */
|
||||||
|
const CoglMatrix *
|
||||||
|
_cogl_pipeline_get_layer_matrix (CoglPipeline *pipeline, int layer_index)
|
||||||
|
{
|
||||||
|
CoglPipelineLayerState change =
|
||||||
|
COGL_PIPELINE_LAYER_STATE_USER_MATRIX;
|
||||||
|
CoglPipelineLayer *layer;
|
||||||
|
CoglPipelineLayer *authority;
|
||||||
|
|
||||||
|
g_return_val_if_fail (cogl_is_pipeline (pipeline), NULL);
|
||||||
|
|
||||||
|
layer = _cogl_pipeline_get_layer (pipeline, layer_index);
|
||||||
|
|
||||||
|
authority = _cogl_pipeline_layer_get_authority (layer, change);
|
||||||
|
return &authority->big_state->matrix;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_pipeline_set_layer_matrix (CoglPipeline *pipeline,
|
cogl_pipeline_set_layer_matrix (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
|
Loading…
Reference in New Issue
Block a user