devilhorns pushed a commit to branch master.

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

commit 49de7d0ee8180de6d8d0692cbf718f11f874e5ef
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed May 6 13:19:08 2015 -0400

    ecore-drm: Add API function to get an output's crtc size
    
    Summary: This adds a new API function to return an output's crtc size.
    This is mainly used for drm RandR config in E
    
    @feature
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_drm/Ecore_Drm.h        | 12 ++++++++++++
 src/lib/ecore_drm/ecore_drm_output.c | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index fcf784b..0003ef5 100644
--- a/src/lib/ecore_drm/Ecore_Drm.h
+++ b/src/lib/ecore_drm/Ecore_Drm.h
@@ -868,6 +868,18 @@ EAPI Eina_List 
*ecore_drm_output_modes_get(Ecore_Drm_Output *output);
  */
 EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev);
 
+/**
+ * Get the size of the crtc for a given output
+ *
+ * @param output The Ecore_Drm_Output to get the crtc size of
+ * @param *width The parameter in which width is stored
+ * @param *height The parameter in which height is stored
+ *
+ * @ingroup Ecore_Drm_Output_Group
+ * @since 1.15
+ */
+EAPI void ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, 
int *height);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/lib/ecore_drm/ecore_drm_output.c 
b/src/lib/ecore_drm/ecore_drm_output.c
index d9283f1..8b4369e 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1263,3 +1263,15 @@ ecore_drm_output_primary_get(Ecore_Drm_Device *dev)
 
    return NULL;
 }
+
+EAPI void
+ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int 
*height)
+{
+   if (width) *width = 0;
+   if (height) *height = 0;
+
+   EINA_SAFETY_ON_NULL_RETURN(output);
+
+   if (width) *width = output->crtc->width;
+   if (height) *height = output->crtc->height;
+}

-- 


Reply via email to