From 03d4309ffc12aa934b5d23aeb1509412bf1bbfd4 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Tue, 11 Oct 2016 21:17:41 +0900 Subject: [PATCH] evas: Modify logic to properly invalidate buffer when buffer size is growing, there is a chance not to invalidate back buffer properly, this commit remove the case. Change-Id: I06778e8abf654c0aef60885f9326aa6f2334b447 Signed-off-by: Wonki Kim --- src/modules/evas/engines/wayland_shm/evas_engine.h | 6 ++++-- src/modules/evas/engines/wayland_shm/evas_outbuf.c | 17 +++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h index 60422a5..92a1f82 100755 --- a/src/modules/evas/engines/wayland_shm/evas_engine.h +++ b/src/modules/evas/engines/wayland_shm/evas_engine.h @@ -81,7 +81,7 @@ struct _Outbuf Ecore_Wl2_Surface *surface; - struct + struct { /* one big buffer for updates. flushed on idle_flush */ RGBA_Image *onebuf; @@ -99,8 +99,10 @@ struct _Outbuf /* Eina_Bool redraw : 1; */ Eina_Bool destination_alpha : 1; } priv; - Eina_Bool dirty : 1; + // TIZEN_ONLY(20161017): Properly invalidate buffer // + int prev_age; + // }; Outbuf *_evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info); diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c index f4a6a9d..c93633e 100755 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -264,19 +264,24 @@ _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage EINA_UNUSED, Tilebuf Render_Output_Swap_Mode _evas_outbuf_swap_mode_get(Outbuf *ob) { + //TIZEN_ONLY(20161017): Properly invalidate buffer int age; + Render_Output_Swap_Mode mode; LOGFN(__FILE__, __LINE__, __FUNCTION__); age = ecore_wl2_surface_assign(ob->surface); - if (!age) return MODE_FULL; + if (age == 1) mode = MODE_COPY; + else if (age == 2) mode = MODE_DOUBLE; + else if (age == 3) mode = MODE_TRIPLE; + else if (age == 4) mode = MODE_QUADRUPLE; + else mode = MODE_FULL; - else if (age == 1) return MODE_COPY; - else if (age == 2) return MODE_DOUBLE; - else if (age == 3) return MODE_TRIPLE; - else if (age == 4) return MODE_QUADRUPLE; + if (ob->prev_age != age) mode = MODE_FULL; + ob->prev_age = age; - return MODE_FULL; + return mode; + // } int -- 2.7.4