cogl/onscreen: Add way to manually add frame infos
We will soon need to use CoglOnscreen frame events communicate cursor plane changes; this means we need to have a way to queue them without going through any of the current APIs that can do so, i.e. the swap buffer functions and direct scanout. Add a function that just adds a frame info to the queue. The one who adds it is responsible for emitting it too. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
parent
88b06e39f4
commit
1c20ba4c32
@ -457,6 +457,14 @@ cogl_onscreen_direct_scanout (CoglOnscreen *onscreen,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cogl_onscreen_add_frame_info (CoglOnscreen *onscreen,
|
||||||
|
CoglFrameInfo *info)
|
||||||
|
{
|
||||||
|
info->frame_counter = onscreen->frame_counter;
|
||||||
|
g_queue_push_tail (&onscreen->pending_frame_infos, info);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef COGL_HAS_X11_SUPPORT
|
#ifdef COGL_HAS_X11_SUPPORT
|
||||||
uint32_t
|
uint32_t
|
||||||
cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen)
|
cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen)
|
||||||
|
@ -304,6 +304,13 @@ cogl_onscreen_direct_scanout (CoglOnscreen *onscreen,
|
|||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cogl_onscreen_add_frame_info: (skip)
|
||||||
|
*/
|
||||||
|
COGL_EXPORT void
|
||||||
|
cogl_onscreen_add_frame_info (CoglOnscreen *onscreen,
|
||||||
|
CoglFrameInfo *info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_onscreen_swap_region:
|
* cogl_onscreen_swap_region:
|
||||||
* @onscreen: A #CoglOnscreen framebuffer
|
* @onscreen: A #CoglOnscreen framebuffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user