diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2018-03-09 16:12:44 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2018-04-20 13:00:28 -0500 |
commit | f53bc90c6230bfde91e43330e9bd63c0ffc1e198 (patch) | |
tree | 9cd1a01830269a3aee11fc9c23dff0f9d1cb16e3 | |
parent | 324c4ede00678801bf0caf26eff24139cc664271 (diff) | |
download | efl-f53bc90c6230bfde91e43330e9bd63c0ffc1e198.tar.gz |
ecore_wl2: Don't unmap buffers at unlock
We should be using dmabuf sync ioctls instead of mmap/munmap every draw,
this makes that happen. The surface code continues to do what its always
done, and map/unlock.
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c b/src/lib/ecore_wl2/ecore_wl2_buffer.c index ced18c145a..3b55981468 100644 --- a/src/lib/ecore_wl2/ecore_wl2_buffer.c +++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c @@ -655,7 +655,7 @@ ecore_wl2_buffer_map(Ecore_Wl2_Buffer *buf, int *w, int *h, int *stride) EINA_SAFETY_ON_NULL_RETURN_VAL(buf, NULL); - if (buf->locked) + if (buf->mapping) { out = buf->mapping; } @@ -674,6 +674,9 @@ ecore_wl2_buffer_map(Ecore_Wl2_Buffer *buf, int *w, int *h, int *stride) if (w) *w = buf->w; if (h) *h = buf->h; if (stride) *stride = (int)buf->stride; + + if (!buf->locked) ecore_wl2_buffer_lock(buf); + return out; } @@ -704,8 +707,6 @@ ecore_wl2_buffer_unlock(Ecore_Wl2_Buffer *b) { if (!b->locked) ERR("Buffer already unlocked\n"); if (buffer_manager->unlock) buffer_manager->unlock(b); - ecore_wl2_buffer_unmap(b); - b->mapping = NULL; b->locked = EINA_FALSE; } |