aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_main.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:48:13 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:48:13 -0700
commit46e1df839be16b057dbc2179626db180d90935c8 (patch)
tree2783b9d1749430c72d9597985277eca3bb7e0e2c /src/lib/evas/canvas/evas_main.c
parentevas: all this function (info, setup and update) are really output related. (diff)
downloadefl-46e1df839be16b057dbc2179626db180d90935c8.tar.gz
evas: factorize call to info and info_free.
Diffstat (limited to 'src/lib/evas/canvas/evas_main.c')
-rw-r--r--src/lib/evas/canvas/evas_main.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 8cac669e6f..d713c4abc0 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1038,13 +1038,26 @@ evas_output_method_set(Evas *eo_e, int render_method)
e->engine.module = em;
evas_module_ref(em);
/* get the engine info struct */
- if (e->engine.func->output_info)
+ if (e->engine.func->info_size)
{
Efl_Canvas_Output *output;
Eina_List *l;
EINA_LIST_FOREACH(e->outputs, l, output)
- if (!output->info) output->info = e->engine.func->output_info();
+ if (!output->info)
+ {
+ output->info = calloc(1, e->engine.func->info_size);
+ if (!output->info) continue ;
+ output->info->magic = rand();
+ output->info_magic = output->info->magic;
+
+ if (e->engine.func->output_info_setup)
+ e->engine.func->output_info_setup(output->info);
+ }
+ }
+ else
+ {
+ CRI("Engine not up to date no info size provided.");
}
// Wayland/drm already handles seats.