Make _cogl_pipeline_get_layer_texture public
There was no other way to get a pointer to the texture attached to a pipeline layer apart from the using the CoglMaterial API but I think this was just an oversight so we should add this in. It is already maked in the sections file for the gtk-doc. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
ec1bb4ce39
commit
55427a18a6
@ -323,7 +323,7 @@ validate_layer_cb (CoglPipeline *pipeline,
|
|||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
CoglTexture *texture =
|
CoglTexture *texture =
|
||||||
_cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
||||||
ValidateLayerState *state = user_data;
|
ValidateLayerState *state = user_data;
|
||||||
gboolean status = TRUE;
|
gboolean status = TRUE;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ _cogl_pipeline_layer_get_texture_real (CoglPipelineLayer *layer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CoglTexture *
|
CoglTexture *
|
||||||
_cogl_pipeline_get_layer_texture (CoglPipeline *pipeline,
|
cogl_pipeline_get_layer_texture (CoglPipeline *pipeline,
|
||||||
int layer_index)
|
int layer_index)
|
||||||
{
|
{
|
||||||
CoglPipelineLayer *layer =
|
CoglPipelineLayer *layer =
|
||||||
@ -1418,8 +1418,6 @@ cogl_pipeline_set_layer_matrix (CoglPipeline *pipeline,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: deprecate and replace with
|
|
||||||
* cogl_pipeline_get_layer_texture() instead. */
|
|
||||||
CoglTexture *
|
CoglTexture *
|
||||||
_cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer)
|
_cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer)
|
||||||
{
|
{
|
||||||
|
@ -142,6 +142,20 @@ cogl_pipeline_set_layer_texture (CoglPipeline *pipeline,
|
|||||||
int layer_index,
|
int layer_index,
|
||||||
CoglTexture *texture);
|
CoglTexture *texture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cogl_pipeline_get_layer_texture:
|
||||||
|
* @pipeline: A #CoglPipeline object
|
||||||
|
* @layer_index: the index of the layer
|
||||||
|
*
|
||||||
|
* Return value: the texture that was set for the given layer of the
|
||||||
|
* pipeline or %NULL if no texture was set.
|
||||||
|
* Stability: unstable
|
||||||
|
* Since: 1.10
|
||||||
|
*/
|
||||||
|
CoglTexture *
|
||||||
|
cogl_pipeline_get_layer_texture (CoglPipeline *pipeline,
|
||||||
|
int layer_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_pipeline_remove_layer:
|
* cogl_pipeline_remove_layer:
|
||||||
* @pipeline: A #CoglPipeline object
|
* @pipeline: A #CoglPipeline object
|
||||||
|
@ -960,10 +960,6 @@ _cogl_pipeline_find_equivalent_parent (CoglPipeline *pipeline,
|
|||||||
CoglPipelineState pipeline_state,
|
CoglPipelineState pipeline_state,
|
||||||
CoglPipelineLayerState layer_state);
|
CoglPipelineLayerState layer_state);
|
||||||
|
|
||||||
CoglTexture *
|
|
||||||
_cogl_pipeline_get_layer_texture (CoglPipeline *pipeline,
|
|
||||||
int layer_index);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pipeline_get_layer_combine_constant (CoglPipeline *pipeline,
|
_cogl_pipeline_get_layer_combine_constant (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
|
@ -308,7 +308,7 @@ validate_tex_coords_cb (CoglPipeline *pipeline,
|
|||||||
|
|
||||||
state->i++;
|
state->i++;
|
||||||
|
|
||||||
texture = _cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
texture = cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
||||||
|
|
||||||
/* NB: NULL textures are handled by _cogl_pipeline_flush_gl_state */
|
/* NB: NULL textures are handled by _cogl_pipeline_flush_gl_state */
|
||||||
if (!texture)
|
if (!texture)
|
||||||
@ -534,7 +534,7 @@ _cogl_rectangles_validate_layer_cb (CoglPipeline *pipeline,
|
|||||||
*/
|
*/
|
||||||
_cogl_pipeline_pre_paint_for_layer (pipeline, layer_index);
|
_cogl_pipeline_pre_paint_for_layer (pipeline, layer_index);
|
||||||
|
|
||||||
texture = _cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
texture = cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
||||||
|
|
||||||
/* NULL textures are handled by
|
/* NULL textures are handled by
|
||||||
* _cogl_pipeline_flush_gl_state */
|
* _cogl_pipeline_flush_gl_state */
|
||||||
@ -697,7 +697,7 @@ _cogl_rectangles_with_multitexture_coords (
|
|||||||
/* If multitexturing failed or we are drawing with a sliced texture
|
/* If multitexturing failed or we are drawing with a sliced texture
|
||||||
* then we only support a single layer so we pluck out the texture
|
* then we only support a single layer so we pluck out the texture
|
||||||
* from the first pipeline layer... */
|
* from the first pipeline layer... */
|
||||||
texture = _cogl_pipeline_get_layer_texture (pipeline, state.first_layer);
|
texture = cogl_pipeline_get_layer_texture (pipeline, state.first_layer);
|
||||||
|
|
||||||
if (rects[i].tex_coords)
|
if (rects[i].tex_coords)
|
||||||
tex_coords = rects[i].tex_coords;
|
tex_coords = rects[i].tex_coords;
|
||||||
@ -904,7 +904,7 @@ append_tex_coord_attributes_cb (CoglPipeline *pipeline,
|
|||||||
/* NULL textures will be handled in
|
/* NULL textures will be handled in
|
||||||
* _cogl_pipeline_flush_layers_gl_state but there is no need to worry
|
* _cogl_pipeline_flush_layers_gl_state but there is no need to worry
|
||||||
* about scaling texture coordinates in this case */
|
* about scaling texture coordinates in this case */
|
||||||
texture = _cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
texture = cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
||||||
if (texture != NULL)
|
if (texture != NULL)
|
||||||
_cogl_texture_transform_coords_to_gl (texture, &tx, &ty);
|
_cogl_texture_transform_coords_to_gl (texture, &tx, &ty);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user