aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/Ecore_Drm2.h
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-09-09 13:31:20 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-09-09 13:39:05 -0500
commit30d14779a6ea6c8c3b80c03fff71dc260a97c6f3 (patch)
treea40b3e4db10ebd36c1f9c19b01dc186b8e99d58a /src/lib/ecore_drm2/Ecore_Drm2.h
parentecore_drm2: Store gbm_bo for Fbs and add a getter function for it (diff)
downloadefl-30d14779a6ea6c8c3b80c03fff71dc260a97c6f3.tar.gz
ecore_drm2: Add release handlers for buffers
Allow the engine to register a callback for buffer release. This lets us do appropriate buffer bookkeeping (for example, gbm locking) in the engine.
Diffstat (limited to 'src/lib/ecore_drm2/Ecore_Drm2.h')
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 99a2e9a278..587f17fe6e 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -61,6 +61,8 @@ typedef struct _Ecore_Drm2_Event_Activate
EAPI extern int ECORE_DRM2_EVENT_OUTPUT_CHANGED;
EAPI extern int ECORE_DRM2_EVENT_ACTIVATE;
+typedef void (*Ecore_Drm2_Release_Handler)(void *data, Ecore_Drm2_Fb *b);
+
/**
* @file
* @brief Ecore functions for dealing with drm, virtual terminals
@@ -809,6 +811,20 @@ EAPI void ecore_drm2_fb_busy_set(Ecore_Drm2_Fb *fb, Eina_Bool busy);
EAPI void ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data);
/**
+ * Register a callback for the buffer release handler
+ *
+ * When a flip completes ecore_drm2 may release a buffer. Use this callback
+ * if you need to do bookkeeping or locking on buffer release.
+ *
+ * @param output The output to register the callback on
+ * @param handler The function to handle the callback
+ * @param data The user data to pass to the callback
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.19
+ */
+EAPI void ecore_drm2_output_release_handler_set(Ecore_Drm2_Output *output, Ecore_Drm2_Release_Handler handler, void *data);
+
+/**
* Get the Framebuffer's gbm buffer object
*
* @param fb The framebuffer to query