summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-06 13:19:08 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-07 14:39:46 -0400
commit49de7d0ee8180de6d8d0692cbf718f11f874e5ef (patch)
tree8ccb92f9737f55c74bee66b05b6c3d0445263140 /src/lib/ecore_drm
parent8120cdcc1369acb0b1f69d8995e9843a4656511c (diff)
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.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/Ecore_Drm.h12
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c12
2 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index fcf784b2c2..0003ef50eb 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);
868 */ 868 */
869EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev); 869EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev);
870 870
871/**
872 * Get the size of the crtc for a given output
873 *
874 * @param output The Ecore_Drm_Output to get the crtc size of
875 * @param *width The parameter in which width is stored
876 * @param *height The parameter in which height is stored
877 *
878 * @ingroup Ecore_Drm_Output_Group
879 * @since 1.15
880 */
881EAPI void ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int *height);
882
871#ifdef __cplusplus 883#ifdef __cplusplus
872} 884}
873#endif 885#endif
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index d9283f1b06..8b4369ec4c 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)
1263 1263
1264 return NULL; 1264 return NULL;
1265} 1265}
1266
1267EAPI void
1268ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int *height)
1269{
1270 if (width) *width = 0;
1271 if (height) *height = 0;
1272
1273 EINA_SAFETY_ON_NULL_RETURN(output);
1274
1275 if (width) *width = output->crtc->width;
1276 if (height) *height = output->crtc->height;
1277}