wayland_shm: Add swap mode fallback when buffer age changes 97/92797/3
authorWonki Kim <wonki_.kim@samsung.com>
Tue, 11 Oct 2016 12:17:41 +0000 (21:17 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 19 Oct 2016 14:18:12 +0000 (07:18 -0700)
This copies the behaviour in opengl_x11 engine, where the buffer
age needs to be continuously the same to be taken into account.
If the age varies, then we fallback to a full redraw.

Apparently this fixes issues on actual devices. I tested this
patch in weston (I didn't have issues before and buffer age is 1).

This commit is cherry-pick of the upstream commit.
https://git.enlightenment.org/core/efl.git/commit/?id=62ca4486ea30fd63a5589ea7af373a5cb9982031

TIZEN_ONLY tag has been removed

Change-Id: If479243d5f8bce5bd41142e833e04602e6152326
Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>
src/modules/evas/engines/wayland_shm/evas_engine.h
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index 00b5ad6..bb82638 100755 (executable)
@@ -80,6 +80,7 @@ struct _Outbuf
    int rotation;
    int onebuf;
    int num_buff;
+   int prev_age;
    Outbuf_Depth depth;
 
    Evas_Engine_Info_Wayland_Shm *info;
@@ -101,9 +102,6 @@ struct _Outbuf
         /* Eina_Bool redraw : 1; */
         Eina_Bool destination_alpha : 1;
      } priv;
-   // TIZEN_ONLY(20161017): Properly invalidate buffer //
-   int prev_age;
-   //
 };
 
 Eina_Bool _evas_tbmbuf_surface_create(Surface *s, int w, int h, int num_buff);
index a229b7b..7c191ca 100755 (executable)
@@ -318,7 +318,6 @@ _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode
 Render_Engine_Swap_Mode
 _evas_outbuf_swap_mode_get(Outbuf *ob)
 {
-   //TIZEN_ONLY(20161017): Properly invalidate buffer
    int age;
    Render_Engine_Swap_Mode mode;
 
@@ -335,7 +334,6 @@ _evas_outbuf_swap_mode_get(Outbuf *ob)
    ob->prev_age = age;
 
    return mode;
-   //
 }
 
 int