evas-wayland-shm: Compare hidden flag during reconfigure
authorChris Michael <cp.michael@samsung.com>
Wed, 11 Jan 2017 17:19:25 +0000 (12:19 -0500)
committerChris Michael <cp.michael@samsung.com>
Wed, 11 Jan 2017 17:36:33 +0000 (12:36 -0500)
Small patch to compare if the hidden flag being passed in is the same
as the one stored in Outbuf. With the addition of xdg_shell v6
support, we cannot commit a surface with an existing buffer until the
surface has been configured. In order to facilitate this, we will use
the 'hidden' flag so that any surface_post does not actually attach a
buffer unless configure has already been handled on the surface.

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index 653d8ec..b76efad 100644 (file)
@@ -356,7 +356,8 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth,
 
    if (!ob->dirty && (ob->w == w) && (ob->h == h) &&
        (ob->rotation == rot) && (ob->depth == depth) && 
-       (ob->priv.destination_alpha == alpha))
+       (ob->priv.destination_alpha == alpha) &&
+       (ob->hidden == hidden))
      return;
 
    dirty = ob->dirty;
@@ -369,8 +370,6 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth,
    ob->priv.destination_alpha = alpha;
    ob->hidden = hidden;
 
-   if (ob->hidden) return;
-
    if ((ob->rotation == 0) || (ob->rotation == 180))
      {
         ob->surface->funcs.reconfigure(ob->surface, w, h, resize, dirty);
@@ -391,6 +390,8 @@ _evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (ob->hidden) return NULL;
+
    RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, ob->w, ob->h);
    if ((w <= 0) || (h <= 0)) return NULL;
 
@@ -519,6 +520,8 @@ _evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, in
    /* check for pending writes */
    if (!ob->priv.pending_writes) return;
 
+   if (ob->hidden) return;
+
    if ((ob->rotation == 0) || (ob->rotation == 180))
      {
         func =