ecore_drm2: Add busy status to ecore_drm2_fb

We've been tracking this in the outbuf code, but that logic is going to
be moved into ecore_evas_drm to use the new ticking paradigm.
This commit is contained in:
Derek Foreman 2016-09-02 12:17:01 -05:00
parent 316ca09b0d
commit d8c9f8ef17
3 changed files with 36 additions and 0 deletions

View File

@ -779,6 +779,29 @@ EAPI void ecore_drm2_fb_dirty(Ecore_Drm2_Fb *fb, Eina_Rectangle *rects, unsigned
*/
EAPI int ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output, void *data);
/**
* Return the Ecore_Drm2_Fb's busy status
*
* @param fb
*
* @return The busy status
*
* @ingroup Ecore_Drm2_Fb_Group
* @since 1.19
*/
EAPI Eina_Bool ecore_drm2_fb_busy_get(Ecore_Drm2_Fb *fb);
/**
* Change the Ecore_Drm2_Fb's busy status
*
* @param fb
* @param busy The new busy status
*
* @ingroup Ecore_Drm2_Fb_Group
* @since 1.19
*/
EAPI void ecore_drm2_fb_busy_set(Ecore_Drm2_Fb *fb, Eina_Bool busy);
# endif
#endif

View File

@ -272,3 +272,15 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output, void *data)
output->current = fb;
return 0;
}
EAPI Eina_Bool
ecore_drm2_fb_busy_get(Ecore_Drm2_Fb *fb)
{
return fb->busy;
}
EAPI void
ecore_drm2_fb_busy_set(Ecore_Drm2_Fb *fb, Eina_Bool busy)
{
fb->busy = busy;
}

View File

@ -94,6 +94,7 @@ struct _Ecore_Drm2_Fb
uint32_t format;
Eina_Bool gbm : 1;
Eina_Bool busy : 1;
void *mmap;
};