summaryrefslogtreecommitdiff
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-07 09:37:02 -0400
commit3bdd71b5ac6d3c14845b8739382908d2bc465028 (patch)
tree5499bd503dff243b51e0e36227c66ff183558eda
parentb30178a788185482733249c1c1a5d5090ffed003 (diff)
downloadefl-3bdd71b5ac6d3c14845b8739382908d2bc465028.tar.gz
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>
-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
*/
EAPI Ecore_Drm2_Plane *ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb);
+/**
+ * Set plane destination values
+ *
+ * @param plane
+ * @param x
+ * @param y
+ * @param w
+ * @param h
+ *
+ * @ingroup Ecore_Drm2_Plane_Group
+ * @since 1.20
+ */
+EAPI void ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, int h);
+
# endif
#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:
return NULL;
#endif
}
+
+EAPI void
+ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, int h)
+{
+ EINA_SAFETY_ON_NULL_RETURN(plane);
+
+ plane->state->cx.value = x;
+ plane->state->cy.value = y;
+ plane->state->cw.value = w;
+ plane->state->ch.value = h;
+}