summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-07-28 09:13:16 -0400
committerChris Michael <cp.michael@samsung.com>2015-07-28 09:18:59 -0400
commitf2caeff9c24c81d7bc0a72a29a48c7875f12bde4 (patch)
treed9791ab39436c8dcbbadd9fd5598462b5b7140ea
parenta1a1a931755b448aeaa6b7307ce4beca674ef074 (diff)
downloadefl-f2caeff9c24c81d7bc0a72a29a48c7875f12bde4.tar.gz
wayland_shm: Don't store frame_cb
Summary: We don't need to - all the frame callback does for us is ensure a queue push. We should destroy any callback we receive when we receive it. @fix Reviewers: zmike, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2874
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c15
2 files changed, 3 insertions, 14 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h
index e9ea18d4b1..50def53ccf 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -75,7 +75,6 @@ struct _Shm_Surface
{
struct wl_shm *shm;
struct wl_surface *surface;
- struct wl_callback *frame_cb;
uint32_t flags;
int w, h;
int dx, dy;
@@ -86,7 +85,6 @@ struct _Shm_Surface
Shm_Leaf leaf[MAX_BUFFERS];
Shm_Leaf *current;
- Eina_Bool redraw : 1;
Eina_Bool alpha : 1;
Eina_Bool mapped : 1;
};
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index f483823489..c6f63a9ca9 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -142,11 +142,8 @@ _shm_frame_release(void *data, struct wl_callback *callback, uint32_t timestamp
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(surf = data)) return;
- if (callback != surf->frame_cb) return;
- wl_callback_destroy(surf->frame_cb);
- surf->frame_cb = NULL;
- surf->redraw = EINA_FALSE;
+ wl_callback_destroy(callback);
}
static const struct wl_callback_listener _shm_frame_listener =
@@ -443,7 +440,6 @@ _evas_shm_surface_swap(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int
surface->dx = 0;
surface->dy = 0;
- surface->redraw = EINA_TRUE;
surface->mapped = EINA_TRUE;
}
@@ -491,16 +487,11 @@ _evas_shm_surface_redraw(Shm_Surface *surface)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (surface->frame_cb)
- {
- if (!surface->redraw) return;
- wl_callback_destroy(surface->frame_cb);
- }
if (!surface->surface) return;
- surface->frame_cb = wl_surface_frame(surface->surface);
- wl_callback_add_listener(surface->frame_cb, &_shm_frame_listener, surface);
+ frame_cb = wl_surface_frame(surface->surface);
+ wl_callback_add_listener(frame_cb, &_shm_frame_listener, surface);
wl_surface_commit(surface->surface);