summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-06 13:01:35 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-06 13:03:52 -0500
commit5ebba4463570626f836cfb0b07b647c36aad7825 (patch)
treef497141afd1f6e39106a89bf9eeb936737e23499
parent261b0faa54010397f28d50830a4a1d33bbf0c25d (diff)
downloadefl-5ebba4463570626f836cfb0b07b647c36aad7825.tar.gz
evas-wayland-shm: Don't destroy Outbuf on resize
On an engine resize, rather than destroy & recreate the Outbuf structure (and the associated surface) we can just call the eng_output_resize function (which in turn will call outbuf_reconfigure) to update Outbuf with new properties. This saves us from having to create a whole new Outbuf every time we resize. Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c14
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c3
3 files changed, 8 insertions, 11 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index c8e4c19590..385c713255 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -20,6 +20,8 @@ static Evas_Func func, pfunc;
Evas_Native_Tbm_Surface_Image_Set_Call glsym__evas_native_tbm_surface_image_set = NULL;
Evas_Native_Tbm_Surface_Stride_Get_Call glsym__evas_native_tbm_surface_stride_get = NULL;
+static void eng_output_resize(void *data, int w, int h);
+
/* engine structure data */
typedef struct _Render_Engine Render_Engine;
struct _Render_Engine
@@ -162,14 +164,7 @@ eng_setup(Evas *eo_evas, void *info)
goto err;
}
else if ((einfo->info.wl_surface) && (!einfo->info.hidden))
- {
- Outbuf *ob;
-
- ob = _evas_outbuf_setup(epd->output.w, epd->output.h, einfo);
- if (ob) evas_render_engine_software_generic_update(&re->generic, ob,
- epd->output.w,
- epd->output.h);
- }
+ eng_output_resize(re, epd->output.w, epd->output.h);
epd->engine.data.output = re;
if (!epd->engine.data.output)
@@ -218,7 +213,8 @@ eng_output_resize(void *data, int w, int h)
_evas_outbuf_reconfigure(re->generic.ob, w, h,
einfo->info.rotation, einfo->info.depth,
- einfo->info.destination_alpha, resize);
+ einfo->info.destination_alpha, resize,
+ einfo->info.hidden);
evas_common_tilebuf_free(re->generic.tb);
if ((re->generic.tb = evas_common_tilebuf_new(w, h)))
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h
index 5bfb6c1c53..2708739845 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -147,7 +147,7 @@ void _evas_outbuf_idle_flush(Outbuf *ob);
Render_Engine_Swap_Mode _evas_outbuf_swap_mode_get(Outbuf *ob);
int _evas_outbuf_rotation_get(Outbuf *ob);
-void _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize);
+void _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize, Eina_Bool hidden);
void *_evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
void _evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
void _evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index fcfb8b95a5..e801474c1a 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -344,7 +344,7 @@ _evas_outbuf_rotation_get(Outbuf *ob)
}
void
-_evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize)
+_evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize, Eina_Bool hidden)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -362,6 +362,7 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth,
ob->rotation = rot;
ob->depth = depth;
ob->priv.destination_alpha = alpha;
+ ob->hidden = hidden;
if (ob->hidden) return;