summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_plane.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-04-28 15:30:34 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-05 12:53:23 -0500
commitab8ec5ed5f50200e3d75e1b5fe81883f2887e2f7 (patch)
treeb6f39ffa249f6a92f2dfaa484621c39af16de41f /src/lib/ecore_drm2/ecore_drm2_plane.c
parentc98a9b06c6d380a15574c1404da33e0620207e71 (diff)
ecore_drm2: Add API to update the fb for a plane
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_plane.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c
index 9ee0bb3a75..a1f0444565 100644
--- a/src/lib/ecore_drm2/ecore_drm2_plane.c
+++ b/src/lib/ecore_drm2/ecore_drm2_plane.c
@@ -142,3 +142,19 @@ ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, i
142 142
143 _fb_atomic_flip_test(plane->output); 143 _fb_atomic_flip_test(plane->output);
144} 144}
145
146EAPI Eina_Bool
147ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb)
148{
149 uint32_t fallback_id;
150
151 EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
152 EINA_SAFETY_ON_NULL_RETURN_VAL(fb, EINA_FALSE);
153
154 fallback_id = plane->state->fid.value;
155 plane->state->fid.value = fb->id;
156 if (_fb_atomic_flip_test(plane->output)) return EINA_TRUE;
157
158 plane->state->fid.value = fallback_id;
159 return EINA_FALSE;
160}