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 4726186224
commit e02a8e15b1
Signed by: sungmg
GPG key ID: 41BAFD6FFD8036C5
2 changed files with 11 additions and 0 deletions

View file

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

View file

@ -468,6 +468,14 @@ cogl_onscreen_pop_head_frame_info (CoglOnscreen *onscreen)
return g_queue_pop_head (&priv->pending_frame_infos); 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 * CoglFrameClosure *
cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen, cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
CoglFrameCallback callback, CoglFrameCallback callback,