diff options
author | Chris Michael <cpmichael@osg.samsung.com> | 2016-06-21 12:59:30 -0400 |
---|---|---|
committer | Chris Michael <cpmichael@osg.samsung.com> | 2016-06-21 12:59:30 -0400 |
commit | 3186f3a5fd2e2659ae6084bae89ef602da8d7b6f (patch) | |
tree | 7a36c8b1f10f2f6d3eb77713a88abfffa74c93b1 | |
parent | 51b589da6a56e9a0bf36226318da4917ec3218fb (diff) | |
download | efl-3186f3a5fd2e2659ae6084bae89ef602da8d7b6f.tar.gz |
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>
-rw-r--r-- | src/modules/evas/engines/drm/evas_outbuf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/evas/engines/drm/evas_outbuf.c b/src/modules/evas/engines/drm/evas_outbuf.c index 4551c852a5..d43a35b207 100644 --- a/src/modules/evas/engines/drm/evas_outbuf.c +++ b/src/modules/evas/engines/drm/evas_outbuf.c @@ -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; } |