From: Wonki Kim Date: Tue, 11 Oct 2016 12:17:41 +0000 (+0900) Subject: evas: Modify logic to properly invalidate buffer X-Git-Tag: accepted/tizen/common/20161019.145824~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3bd4143d52a8900df4d2ee4a291f3c97b9ec81a;p=platform%2Fupstream%2Fefl.git 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 --- diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h index 9eba16a..00b5ad6 100755 --- a/src/modules/evas/engines/wayland_shm/evas_engine.h +++ b/src/modules/evas/engines/wayland_shm/evas_engine.h @@ -86,7 +86,7 @@ struct _Outbuf Surface *surface; - struct + struct { /* one big buffer for updates. flushed on idle_flush */ RGBA_Image *onebuf; @@ -101,6 +101,9 @@ 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 6d91c0a..a229b7b 100755 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -318,17 +318,24 @@ _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; LOGFN(__FILE__, __LINE__, __FUNCTION__); age = ob->surface->funcs.assign(ob->surface); - 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 (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; - return MODE_FULL; + if (ob->prev_age != age) mode = MODE_FULL; + ob->prev_age = age; + + return mode; + // } int