wayland-shm: Assign buffers in the swap_mode callback
authorDerek Foreman <derekf@osg.samsung.com>
Thu, 30 Jul 2015 15:45:32 +0000 (11:45 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 30 Jul 2015 15:45:32 +0000 (11:45 -0400)
Summary:
This is when we're about to start a new render, so it's the best
time to set up the next buffer to draw to.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2892

src/modules/evas/engines/wayland_shm/evas_outbuf.c
src/modules/evas/engines/wayland_shm/evas_shm.c

index 03ff7a2..e1e8f63 100644 (file)
@@ -255,6 +255,8 @@ _evas_outbuf_swap_mode_get(Outbuf *ob)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (!_evas_shm_surface_assign(ob->surface)) return MODE_FULL;
+
    /* This was broken, for now we just do full redraws */
    return MODE_FULL;
 
index 90df693..9860d9f 100644 (file)
@@ -426,8 +426,6 @@ _evas_shm_surface_data_get(Shm_Surface *surface, int *w, int *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   _evas_shm_surface_assign(surface);
-
    if (w) *w = 0;
    if (h) *h = 0;