sub-texture: Exposes a getter for parent texture
This adds a cogl_sub_texture_get_parent getter for the parent of a CoglSubTexture. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
3bc70687ac
commit
fc88e166f0
@ -256,6 +256,12 @@ cogl_sub_texture_new (CoglContext *ctx,
|
|||||||
return _cogl_sub_texture_handle_new (sub_tex);
|
return _cogl_sub_texture_handle_new (sub_tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoglTexture *
|
||||||
|
cogl_sub_texture_get_parent (CoglSubTexture *sub_texture)
|
||||||
|
{
|
||||||
|
return sub_texture->next_texture;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_cogl_sub_texture_get_max_waste (CoglTexture *tex)
|
_cogl_sub_texture_get_max_waste (CoglTexture *tex)
|
||||||
{
|
{
|
||||||
|
@ -89,6 +89,22 @@ cogl_sub_texture_new (CoglContext *ctx,
|
|||||||
int sub_width,
|
int sub_width,
|
||||||
int sub_height);
|
int sub_height);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cogl_sub_texture_get_parent:
|
||||||
|
* @sub_texture: A pointer to a #CoglSubTexture
|
||||||
|
*
|
||||||
|
* Retrieves the parent texture that @sub_texture derives its content
|
||||||
|
* from. This is the texture that was passed to
|
||||||
|
* cogl_sub_texture_new() as the parent_texture argument.
|
||||||
|
*
|
||||||
|
* Return value: (transfer none): The parent texture that @sub_texture
|
||||||
|
* derives its content from.
|
||||||
|
* Since: 1.10
|
||||||
|
* Stability: unstable
|
||||||
|
*/
|
||||||
|
CoglTexture *
|
||||||
|
cogl_sub_texture_get_parent (CoglSubTexture *sub_texture);
|
||||||
|
|
||||||
#define cogl_is_sub_texture cogl_is_sub_texture_EXP
|
#define cogl_is_sub_texture cogl_is_sub_texture_EXP
|
||||||
/**
|
/**
|
||||||
* cogl_is_sub_texture:
|
* cogl_is_sub_texture:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user