ecore-drm2: Add API to return current fb used on a given output
authorChris Michael <cpmichael@osg.samsung.com>
Wed, 11 May 2016 13:37:50 +0000 (09:37 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Fri, 27 May 2016 15:57:53 +0000 (11:57 -0400)
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
src/lib/ecore_drm2/Ecore_Drm2.h
src/lib/ecore_drm2/ecore_drm2_outputs.c

index 494d03a..925a946 100644 (file)
@@ -369,6 +369,18 @@ EAPI unsigned int ecore_drm2_output_crtc_get(Ecore_Drm2_Output *output);
 EAPI Ecore_Drm2_Fb *ecore_drm2_output_next_fb_get(Ecore_Drm2_Output *output);
 
 /**
+ * Return the current Ecore_Drm2_Fb used on a given output
+ *
+ * @param output
+ *
+ * @return The current Ecore_Drm2_Fb used on this output, or NULL otherwise
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI Ecore_Drm2_Fb *ecore_drm2_output_current_fb_get(Ecore_Drm2_Output *output);
+
+/**
  * Set the next Ecore_Drm2_Fb to be used on a given output
  *
  * @param output
index 87f9628..b55c0d8 100644 (file)
@@ -899,6 +899,13 @@ ecore_drm2_output_next_fb_set(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb)
    output->next = fb;
 }
 
+EAPI Ecore_Drm2_Fb *
+ecore_drm2_output_current_fb_get(Ecore_Drm2_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
+   return output->current;
+}
+
 EAPI void
 ecore_drm2_output_crtc_size_get(Ecore_Drm2_Output *output, int *w, int *h)
 {