summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-03-27 13:30:56 -0400
committerChris Michael <cp.michael@samsung.com>2017-04-18 07:55:10 -0400
commit9e07d37320718bbabd4feb4ff151fcb3cfd9f333 (patch)
tree04f3e52c6e8691ffaa5d6706c81ddc23e4f134cd /src
parent44d5c855e08d3e5034277b0047a444d1b2e55a9a (diff)
ecore-drm2: Add API function to set plane destination
When we do an atomic commit, we need to know where to place a given plane (in the case of overlays) in relation to the CRTC, so provide an API function that can be used for that purpose. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h14
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_plane.c11
2 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 62eebc1e52..6f1296d204 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -1008,6 +1008,20 @@ EAPI Ecore_Drm2_Fb *ecore_drm2_fb_dmabuf_import(int fd, int width, int height, i
1008 */ 1008 */
1009EAPI Ecore_Drm2_Plane *ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb); 1009EAPI Ecore_Drm2_Plane *ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb);
1010 1010
1011/**
1012 * Set plane destination values
1013 *
1014 * @param plane
1015 * @param x
1016 * @param y
1017 * @param w
1018 * @param h
1019 *
1020 * @ingroup Ecore_Drm2_Plane_Group
1021 * @since 1.20
1022 */
1023EAPI void ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, int h);
1024
1011# endif 1025# endif
1012 1026
1013#endif 1027#endif
diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c
index ef7d813241..d22bda76d2 100644
--- a/src/lib/ecore_drm2/ecore_drm2_plane.c
+++ b/src/lib/ecore_drm2/ecore_drm2_plane.c
@@ -111,3 +111,14 @@ out:
111 return NULL; 111 return NULL;
112#endif 112#endif
113} 113}
114
115EAPI void
116ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, int h)
117{
118 EINA_SAFETY_ON_NULL_RETURN(plane);
119
120 plane->state->cx.value = x;
121 plane->state->cy.value = y;
122 plane->state->cw.value = w;
123 plane->state->ch.value = h;
124}