[draw-buffer] Adds cogl_draw_buffer_get_{width,height} API
Simply adds missing API to query the width and height of any Cogl draw buffer.
This commit is contained in:
parent
b4770c1e9b
commit
e4fe655521
2 changed files with 18 additions and 0 deletions
|
@ -76,6 +76,10 @@ typedef struct _CoglOnscreen
|
|||
|
||||
void
|
||||
_cogl_draw_buffer_state_init (void);
|
||||
int
|
||||
_cogl_draw_buffer_get_width (CoglHandle handle);
|
||||
int
|
||||
_cogl_draw_buffer_get_height (CoglHandle handle);
|
||||
CoglClipStackState *
|
||||
_cogl_draw_buffer_get_clip_state (CoglHandle handle);
|
||||
void
|
||||
|
|
|
@ -130,6 +130,20 @@ _cogl_draw_buffer_free (CoglDrawBuffer *draw_buffer)
|
|||
draw_buffer->projection_stack = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
_cogl_draw_buffer_get_width (CoglHandle handle)
|
||||
{
|
||||
CoglDrawBuffer *draw_buffer = COGL_DRAW_BUFFER (handle);
|
||||
return draw_buffer->width;
|
||||
}
|
||||
|
||||
int
|
||||
_cogl_draw_buffer_get_height (CoglHandle handle)
|
||||
{
|
||||
CoglDrawBuffer *draw_buffer = COGL_DRAW_BUFFER (handle);
|
||||
return draw_buffer->height;
|
||||
}
|
||||
|
||||
CoglClipStackState *
|
||||
_cogl_draw_buffer_get_clip_state (CoglHandle handle)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue