devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=253f88b3ec596d47b3d0c63d3bead3d8c0bdef5c
commit 253f88b3ec596d47b3d0c63d3bead3d8c0bdef5c Author: Chris Michael <[email protected]> Date: Wed May 11 09:37:50 2016 -0400 ecore-drm2: Add API to return current fb used on a given output Signed-off-by: Chris Michael <[email protected]> --- src/lib/ecore_drm2/Ecore_Drm2.h | 12 ++++++++++++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 494d03a..925a946 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 87f9628..b55c0d8 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) { --
