evas-drm: Reset current buffer state when pageflip completes

When an fbo pageflip finishes, we should be marking the current fbo
(one just sent) as no longer busy since it's already been pixel
blasted to the screen. Also, if we fail to flip to a given fbo during
buffer swap, then don't leave that fbo marked as busy since it is
technically not in use

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-06-21 12:59:30 -04:00
parent 51b589da6a
commit 3186f3a5fd
1 changed files with 8 additions and 1 deletions

View File

@ -80,7 +80,11 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se
ob = data;
ofb = ob->priv.current;
if (ofb) ofb->busy = EINA_FALSE;
if (ofb)
{
ofb->busy = EINA_FALSE;
ofb->age = 0;
}
next = ecore_drm2_output_next_fb_get(ob->priv.output);
if (next)
@ -121,6 +125,9 @@ _outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, unsigned int count)
if (ecore_drm2_fb_flip(ofb->fb, ob->priv.output, ob) < 0)
{
_outbuf_tick_source_set(NULL);
ofb->busy = EINA_FALSE;
ofb->drawn = EINA_FALSE;
ofb->age = 0;
return;
}