ecore_drm2: Add ecore_drm2_plane_release to release planes

Opposite of plane assign.
This commit is contained in:
Derek Foreman 2017-04-27 15:45:51 -05:00
parent 014e84d8fa
commit ba2275b7ec
2 changed files with 20 additions and 0 deletions

View File

@ -1008,6 +1008,16 @@ 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);
/**
* Remove a hardware plane from display
*
* @param plane
*
* @ingroup Ecore_Drm2_Plane_Group
* @since 1.20
*/
EAPI void ecore_drm2_plane_release(Ecore_Drm2_Plane *plane);
/**
* Set plane destination values
*

View File

@ -112,6 +112,16 @@ out:
return plane;
}
EAPI void
ecore_drm2_plane_release(Ecore_Drm2_Plane *plane)
{
EINA_SAFETY_ON_NULL_RETURN(plane);
plane->state->in_use = EINA_FALSE;
plane->output->planes = eina_list_remove(plane->output->planes, plane);
free(plane);
}
EAPI void
ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, int h)
{