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.
EINA_SAFETY_ON_NULL_RETURN_VAL(buf, NULL);
- if (buf->locked)
+ if (buf->mapping)
{
out = buf->mapping;
}
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;
}
{
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;
}