[mutter] cogl/onscreen: Add way to manually add frame infos
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl/onscreen: Add way to manually add frame infos
- Date: Fri, 22 Jan 2021 17:08:31 +0000 (UTC)
commit 1c20ba4c323b9d999942e0d0ca7fa48b2ddd4d4d
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Sat Oct 10 00:39:53 2020 +0200
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>
cogl/cogl/cogl-onscreen.c | 8 ++++++++
cogl/cogl/cogl-onscreen.h | 7 +++++++
2 files changed, 15 insertions(+)
---
diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c
index 367fd26982..30aacbf6fb 100644
--- a/cogl/cogl/cogl-onscreen.c
+++ b/cogl/cogl/cogl-onscreen.c
@@ -457,6 +457,14 @@ cogl_onscreen_direct_scanout (CoglOnscreen *onscreen,
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
uint32_t
cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen)
diff --git a/cogl/cogl/cogl-onscreen.h b/cogl/cogl/cogl-onscreen.h
index f0b143fa89..308513a307 100644
--- a/cogl/cogl/cogl-onscreen.h
+++ b/cogl/cogl/cogl-onscreen.h
@@ -304,6 +304,13 @@ cogl_onscreen_direct_scanout (CoglOnscreen *onscreen,
gpointer user_data,
GError **error);
+/**
+ * cogl_onscreen_add_frame_info: (skip)
+ */
+COGL_EXPORT void
+cogl_onscreen_add_frame_info (CoglOnscreen *onscreen,
+ CoglFrameInfo *info);
+
/**
* cogl_onscreen_swap_region:
* @onscreen: A #CoglOnscreen framebuffer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]