derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=eec565cc0fe9eca6aea73fc8963f0ebbb2bbc154

commit eec565cc0fe9eca6aea73fc8963f0ebbb2bbc154
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Fri Aug 11 14:48:41 2017 -0500

    ecore_drm2: Add query for pending pageflip
    
    We've been tracking this in ecore_evas, but ecore_evas isn't the only
    caller, and it doesn't know about flips initiated by the evas engines.
---
 src/lib/ecore_drm2/Ecore_Drm2.h         | 12 ++++++++++++
 src/lib/ecore_drm2/ecore_drm2_outputs.c | 10 ++++++++++
 2 files changed, 22 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 031a3dac88..e1609adac2 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -1059,6 +1059,18 @@ EAPI Eina_Bool 
ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int se
 
 EAPI int ecore_drm2_device_fd_get(Ecore_Drm2_Device *device);
 
+/**
+ * Check if there's a pageflip in progress for an output
+ *
+ * Checks whether an output has submit a flip but not yet had
+ * a callback completion event for that flip yet.
+ *
+ * @param output
+ * @return Whether there's a flip in progress or not
+ * @since 1.20
+ */
+EAPI Eina_Bool ecore_drm2_output_pending_get(Ecore_Drm2_Output *output);
+
 # endif
 
 #endif
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c 
b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 29e26c80bc..1f52953ffb 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1637,3 +1637,13 @@ ecore_drm2_output_info_get(Ecore_Drm2_Output *output, 
int *x, int *y, int *w, in
    if (x) *x = output->x;
    if (y) *y = output->y;
 }
+
+EAPI Eina_Bool
+ecore_drm2_output_pending_get(Ecore_Drm2_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+
+   if (output->pending.fb) return EINA_TRUE;
+
+   return EINA_FALSE;
+}

-- 


Reply via email to