summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-01-05 13:33:19 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-01-05 13:40:31 -0600
commit7b0f93788056a754cab467b3cad00e3f108756a1 (patch)
treefef8e71a31d482202e2b6335e1b823459fa3f7c9
parentbc000f3ad29d219c06cb0208ae3485ad138cc6d2 (diff)
downloadefl-7b0f93788056a754cab467b3cad00e3f108756a1.tar.gz
wayland_shm: Add a force flag to surface reconfigure
We're going to need a way to force reconfigure unconditionally to make session recovery work again.
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c4
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c4
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c4
4 files changed, 8 insertions, 6 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index de0cd80587..ff14bf3081 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -558,7 +558,7 @@ _evas_dmabuf_buffer_destroy(Dmabuf_Buffer *b)
}
static void
-_evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_UNUSED)
+_evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_UNUSED, Eina_Bool force)
{
Dmabuf_Buffer *buf;
Dmabuf_Surface *surface;
@@ -571,7 +571,7 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_U
int stride = b->stride;
/* If stride is a little bigger than width we still fit */
- if ((w >= b->w) && (w <= stride / 4) && (h == b->h))
+ if (!force && (w >= b->w) && (w <= stride / 4) && (h == b->h))
{
b->w = w;
continue;
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h
index 2708739845..5f6d743531 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -96,7 +96,7 @@ struct _Surface
struct
{
void (*destroy)(Surface *surface);
- void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags);
+ void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags, Eina_Bool force);
void *(*data_get)(Surface *surface, int *w, int *h);
int (*assign)(Surface *surface);
void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden);
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index e801474c1a..b2ab48eb51 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -368,11 +368,11 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth,
if ((ob->rotation == 0) || (ob->rotation == 180))
{
- ob->surface->funcs.reconfigure(ob->surface, w, h, resize);
+ ob->surface->funcs.reconfigure(ob->surface, w, h, resize, EINA_FALSE);
}
else if ((ob->rotation == 90) || (ob->rotation == 270))
{
- ob->surface->funcs.reconfigure(ob->surface, h, w, resize);
+ ob->surface->funcs.reconfigure(ob->surface, h, w, resize, EINA_FALSE);
}
_evas_outbuf_idle_flush(ob);
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index d38a19fd49..b1c55531d8 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -414,7 +414,7 @@ _evas_shm_surface_destroy(Surface *surface)
}
void
-_evas_shm_surface_reconfigure(Surface *s, int w, int h, uint32_t flags)
+_evas_shm_surface_reconfigure(Surface *s, int w, int h, uint32_t flags, Eina_Bool force)
{
Shm_Surface *surface;
int i = 0, resize = 0;
@@ -424,6 +424,8 @@ _evas_shm_surface_reconfigure(Surface *s, int w, int h, uint32_t flags)
surface = s->surf.shm;
resize = !!flags;
+ if (force) for (; i < surface->num_buff; i++) surface->leaf[i].busy = EINA_FALSE;
+
for (; i < surface->num_buff; i++)
{
/* don't resize any busy leafs */