forked from enlightenment/efl
evas-drm: Override eng_output_resize function
This patch provides an override in the evas drm engine for the output resize function. We override this function so that we can reconfigure the output buffer. ref T5999 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
bd2588e72f
commit
8a516c4d4f
|
@ -49,6 +49,10 @@ eng_output_setup(void *engine, void *einfo, unsigned int w, unsigned int h)
|
|||
ob->w, ob->h))
|
||||
goto init_err;
|
||||
|
||||
evas_render_engine_software_generic_merge_mode_set(&re->generic);
|
||||
|
||||
re->generic.ob->info = einfo;
|
||||
|
||||
return re;
|
||||
|
||||
init_err:
|
||||
|
@ -66,15 +70,33 @@ eng_output_info_setup(void *info)
|
|||
einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
|
||||
}
|
||||
|
||||
static int
|
||||
eng_output_update(void *engine EINA_UNUSED, void *data, void *einfo, unsigned int w, unsigned int h)
|
||||
static void
|
||||
eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h)
|
||||
{
|
||||
Evas_Engine_Info_Drm *info = einfo;
|
||||
Render_Engine *re = data;
|
||||
Evas_Engine_Info_Drm *info;
|
||||
|
||||
info = re->generic.ob->info;
|
||||
if (!info) return;
|
||||
|
||||
_outbuf_reconfigure(re->generic.ob, w, h,
|
||||
info->info.rotation, info->info.depth);
|
||||
|
||||
evas_common_tilebuf_free(re->generic.tb);
|
||||
if ((re->generic.tb = evas_common_tilebuf_new(w, h)))
|
||||
evas_common_tilebuf_set_tile_size(re->generic.tb, TILESIZE, TILESIZE);
|
||||
|
||||
re->generic.w = w;
|
||||
re->generic.h = h;
|
||||
}
|
||||
|
||||
static int
|
||||
eng_output_update(void *engine, void *data, void *einfo EINA_UNUSED, unsigned int w, unsigned int h)
|
||||
{
|
||||
Render_Engine *re = data;
|
||||
|
||||
eng_output_resize(engine, data, w, h);
|
||||
|
||||
evas_render_engine_software_generic_update(&re->generic,
|
||||
re->generic.ob, w, h);
|
||||
|
||||
|
@ -227,6 +249,7 @@ module_open(Evas_Module *em)
|
|||
ORD(output_setup);
|
||||
ORD(output_update);
|
||||
ORD(output_free);
|
||||
ORD(output_resize);
|
||||
ORD(image_plane_assign);
|
||||
ORD(image_plane_release);
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ struct _Outbuf
|
|||
int w, h, bpp, rotation;
|
||||
unsigned int depth, format;
|
||||
|
||||
Evas_Engine_Info_Drm *info;
|
||||
|
||||
struct
|
||||
{
|
||||
int num;
|
||||
|
|
Loading…
Reference in New Issue