1
0
Fork 0

cogl/onscreen: Add function cogl_onscreen_get_pending_frame_count

Signed-off-by: Mingi Sung <sungmg@saltyming.net>
This commit is contained in:
Daniel van Vugt 2021-09-17 17:48:20 +08:00 committed by Mingi Sung
parent 2cdcc4b9cc
commit 0b33663007
Signed by: sungmg
GPG key ID: 41BAFD6FFD8036C5
2 changed files with 11 additions and 0 deletions

View file

@ -79,3 +79,6 @@ cogl_onscreen_peek_tail_frame_info (CoglOnscreen *onscreen);
COGL_EXPORT CoglFrameInfo *
cogl_onscreen_pop_head_frame_info (CoglOnscreen *onscreen);
COGL_EXPORT unsigned int
cogl_onscreen_get_pending_frame_count (CoglOnscreen *onscreen);

View file

@ -514,6 +514,14 @@ cogl_onscreen_pop_head_frame_info (CoglOnscreen *onscreen)
return g_queue_pop_head (&priv->pending_frame_infos);
}
unsigned int
cogl_onscreen_get_pending_frame_count (CoglOnscreen *onscreen)
{
CoglOnscreenPrivate *priv = cogl_onscreen_get_instance_private (onscreen);
return g_queue_get_length (&priv->pending_frame_infos);
}
CoglFrameClosure *
cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
CoglFrameCallback callback,