wayland_shm: Track size of buffer
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 6 Nov 2017 23:01:16 +0000 (17:01 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Wed, 8 Nov 2017 21:12:44 +0000 (15:12 -0600)
src/modules/evas/engines/wayland_shm/evas_dmabuf.c

index a956b6a..813d7b2 100644 (file)
@@ -53,6 +53,7 @@ struct _Dmabuf_Buffer
 {
    Dmabuf_Surface *surface;
    struct wl_buffer *wl_buffer;
+   int size;
    int w, h;
    int age;
    unsigned long stride;
@@ -694,6 +695,7 @@ _evas_dmabuf_buffer_init(Dmabuf_Surface *s, int w, int h)
      }
    out->w = w;
    out->h = h;
+   out->size = out->stride * h;
 
    out->wl_buffer = _buffer_manager_buf_to_wl_buffer(s->surface->ob->ewd, out);