1
0
Fork 0

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:
Robert Bragg 2011-12-12 18:20:00 +00:00
parent 3bc70687ac
commit fc88e166f0
2 changed files with 22 additions and 0 deletions

View file

@ -256,6 +256,12 @@ cogl_sub_texture_new (CoglContext *ctx,
return _cogl_sub_texture_handle_new (sub_tex);
}
CoglTexture *
cogl_sub_texture_get_parent (CoglSubTexture *sub_texture)
{
return sub_texture->next_texture;
}
static int
_cogl_sub_texture_get_max_waste (CoglTexture *tex)
{

View file

@ -89,6 +89,22 @@ cogl_sub_texture_new (CoglContext *ctx,
int sub_width,
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
/**
* cogl_is_sub_texture: