aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_out.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_out.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_out.c')
-rw-r--r--src/lib/evas/canvas/evas_out.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 48bd5df96d..567ea58dc8 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -38,11 +38,22 @@ efl_canvas_output_add(Evas *canvas)
// The engine is already initialized, use it
// right away to setup the info structure
- if (e->engine.func->output_info)
+ if (e->engine.func->info_size)
{
- r->info = e->engine.func->output_info();
+ r->info = calloc(1, e->engine.func->info_size);
+ if (!r->info) goto on_error;
+ r->info->magic = rand();
+ r->info_magic = r->info->magic;
+
+ if (e->engine.func->output_info_setup)
+ e->engine.func->output_info_setup(r->info);
+ }
+ else
+ {
+ CRI("Engine not up to date no info size provided.");
}
+ on_error:
return r;
}
@@ -62,7 +73,8 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
output->ector);
e->engine.func->output_free(_evas_engine_context(e),
output->output);
- e->engine.func->output_info_free(output->info);
+ free(output->info);
+ output->info = NULL;
}
e->outputs = eina_list_remove(e->outputs, output);