summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-09 16:12:44 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-04-20 13:00:28 -0500
commitf53bc90c6230bfde91e43330e9bd63c0ffc1e198 (patch)
tree9cd1a01830269a3aee11fc9c23dff0f9d1cb16e3 /src
parent324c4ede00678801bf0caf26eff24139cc664271 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_buffer.c7
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)
655 655
656 EINA_SAFETY_ON_NULL_RETURN_VAL(buf, NULL); 656 EINA_SAFETY_ON_NULL_RETURN_VAL(buf, NULL);
657 657
658 if (buf->locked) 658 if (buf->mapping)
659 { 659 {
660 out = buf->mapping; 660 out = buf->mapping;
661 } 661 }
@@ -674,6 +674,9 @@ ecore_wl2_buffer_map(Ecore_Wl2_Buffer *buf, int *w, int *h, int *stride)
674 if (w) *w = buf->w; 674 if (w) *w = buf->w;
675 if (h) *h = buf->h; 675 if (h) *h = buf->h;
676 if (stride) *stride = (int)buf->stride; 676 if (stride) *stride = (int)buf->stride;
677
678 if (!buf->locked) ecore_wl2_buffer_lock(buf);
679
677 return out; 680 return out;
678} 681}
679 682
@@ -704,8 +707,6 @@ ecore_wl2_buffer_unlock(Ecore_Wl2_Buffer *b)
704{ 707{
705 if (!b->locked) ERR("Buffer already unlocked\n"); 708 if (!b->locked) ERR("Buffer already unlocked\n");
706 if (buffer_manager->unlock) buffer_manager->unlock(b); 709 if (buffer_manager->unlock) buffer_manager->unlock(b);
707 ecore_wl2_buffer_unmap(b);
708 b->mapping = NULL;
709 b->locked = EINA_FALSE; 710 b->locked = EINA_FALSE;
710} 711}
711 712