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>
This commit is contained in:
parent
261b0faa54
commit
5ebba44635
|
@ -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)))
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue