From 53bbc5037f3048d49a322d31fe901160538576c3 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Tue, 11 Oct 2016 21:17:41 +0900 Subject: [PATCH] wayland_shm: Add swap mode fallback when buffer age changes 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 --- src/modules/evas/engines/wayland_shm/evas_engine.h | 4 +--- src/modules/evas/engines/wayland_shm/evas_outbuf.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h index 00b5ad6..bb82638 100755 --- a/src/modules/evas/engines/wayland_shm/evas_engine.h +++ b/src/modules/evas/engines/wayland_shm/evas_engine.h @@ -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); diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c index a229b7b..7c191ca 100755 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -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 -- 2.7.4