summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-11-30 10:09:38 -0200
committerRafael Antognolli <rafael.antognolli@intel.com>2013-12-02 13:24:56 -0200
commit5966a730cd802f1e70bdbbd0138f43a8254ec890 (patch)
treed38d0e9909b962e7a15cd6648fe47bd2325e0937
parentf44518e872c9efc34a8e3f24e94d468c8678fa6e (diff)
downloadefl-5966a730cd802f1e70bdbbd0138f43a8254ec890.tar.gz
evas/wayland_shm: Don't use a global var to store the sent buffer.
When an Ecore_Evas is hidden, it will destroy the buffer swapper. When it's shown again, it will try to attach a new buffer, that can be same buffer. If that global var is still pointing to the old buffer, it can match to it again and avoid sending a new buffer. So, just put this sent buffer var in the buffer swapper, and it will get set to NULL when the swapper is destroyed and created again. This should fix an intermitent problem of ecore_evas_show() not always working after an ecore_evas_hide() on the wayland_shm engine.
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_swapper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapper.c b/src/modules/evas/engines/wayland_shm/evas_swapper.c
index f9f5b3de21..1a879faece 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapper.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapper.c
@@ -29,6 +29,7 @@ struct _Wl_Buffer
struct _Wl_Swapper
{
Wl_Buffer buff[3];
+ Wl_Buffer *buffer_sent;
int in_use;
int dx, dy, w, h, depth;
int buff_cur, buff_num;
@@ -448,7 +449,6 @@ static void
_evas_swapper_buffer_put(Wl_Swapper *ws, Wl_Buffer *wb, Eina_Rectangle *rects, unsigned int count)
{
Eina_Rectangle *rect;
- static Wl_Buffer *sent = NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -488,12 +488,12 @@ _evas_swapper_buffer_put(Wl_Swapper *ws, Wl_Buffer *wb, Eina_Rectangle *rects, u
}
/* surface attach */
- if (sent != wb)
+ if (ws->buffer_sent != wb)
{
wl_surface_attach(ws->surface, wb->buffer, ws->dx, ws->dy);
ws->dx = 0;
ws->dy = 0;
- sent = wb;
+ ws->buffer_sent = wb;
}
wl_surface_damage(ws->surface, rect->x, rect->y, rect->w, rect->h);