summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-11 09:37:50 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commit253f88b3ec596d47b3d0c63d3bead3d8c0bdef5c (patch)
tree8c4fb3fa4f9c8e38f0927b517e65ab96bc8d4f71
parentd08d7e18e3a43f12ee9c109031a80b950d552868 (diff)
downloadefl-253f88b3ec596d47b3d0c63d3bead3d8c0bdef5c.tar.gz
ecore-drm2: Add API to return current fb used on a given output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h12
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c7
2 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 494d03ad83..925a9466b9 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -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
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 87f962861c..b55c0d8417 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -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)
{