summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/evas_main.c17
-rw-r--r--src/lib/evas/canvas/evas_out.c18
-rw-r--r--src/lib/evas/include/evas_private.h12
3 files changed, 37 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 8cac669..d713c4a 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)
1038 e->engine.module = em; 1038 e->engine.module = em;
1039 evas_module_ref(em); 1039 evas_module_ref(em);
1040 /* get the engine info struct */ 1040 /* get the engine info struct */
1041 if (e->engine.func->output_info) 1041 if (e->engine.func->info_size)
1042 { 1042 {
1043 Efl_Canvas_Output *output; 1043 Efl_Canvas_Output *output;
1044 Eina_List *l; 1044 Eina_List *l;
1045 1045
1046 EINA_LIST_FOREACH(e->outputs, l, output) 1046 EINA_LIST_FOREACH(e->outputs, l, output)
1047 if (!output->info) output->info = e->engine.func->output_info(); 1047 if (!output->info)
1048 {
1049 output->info = calloc(1, e->engine.func->info_size);
1050 if (!output->info) continue ;
1051 output->info->magic = rand();
1052 output->info_magic = output->info->magic;
1053
1054 if (e->engine.func->output_info_setup)
1055 e->engine.func->output_info_setup(output->info);
1056 }
1057 }
1058 else
1059 {
1060 CRI("Engine not up to date no info size provided.");
1048 } 1061 }
1049 1062
1050 // Wayland/drm already handles seats. 1063 // Wayland/drm already handles seats.
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 48bd5df..567ea58 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)
38 38
39 // The engine is already initialized, use it 39 // The engine is already initialized, use it
40 // right away to setup the info structure 40 // right away to setup the info structure
41 if (e->engine.func->output_info) 41 if (e->engine.func->info_size)
42 { 42 {
43 r->info = e->engine.func->output_info(); 43 r->info = calloc(1, e->engine.func->info_size);
44 if (!r->info) goto on_error;
45 r->info->magic = rand();
46 r->info_magic = r->info->magic;
47
48 if (e->engine.func->output_info_setup)
49 e->engine.func->output_info_setup(r->info);
50 }
51 else
52 {
53 CRI("Engine not up to date no info size provided.");
44 } 54 }
45 55
56 on_error:
46 return r; 57 return r;
47} 58}
48 59
@@ -62,7 +73,8 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
62 output->ector); 73 output->ector);
63 e->engine.func->output_free(_evas_engine_context(e), 74 e->engine.func->output_free(_evas_engine_context(e),
64 output->output); 75 output->output);
65 e->engine.func->output_info_free(output->info); 76 free(output->info);
77 output->info = NULL;
66 } 78 }
67 e->outputs = eina_list_remove(e->outputs, output); 79 e->outputs = eina_list_remove(e->outputs, output);
68 80
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 0e71d31..ba6b752 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1334,7 +1334,8 @@ struct _Efl_Canvas_Output
1334 1334
1335 Ector_Surface *ector; 1335 Ector_Surface *ector;
1336 1336
1337 void *info, *output; 1337 Evas_Engine_Info *info;
1338 void *output;
1338 Evas_Coord x, y, w, h; 1339 Evas_Coord x, y, w, h;
1339 1340
1340 int info_magic; 1341 int info_magic;
@@ -1393,10 +1394,9 @@ struct _Evas_Object_Func
1393 1394
1394struct _Evas_Func 1395struct _Evas_Func
1395{ 1396{
1396 void *(*output_info) (void); 1397 void (*output_info_setup) (void *info);
1397 void (*output_info_free) (void *info); 1398 void *(*output_setup) (void *engine, void *info, unsigned int w, unsigned int h);
1398 void *(*output_setup) (void *engine, void *info, unsigned int w, unsigned int h); 1399 int (*output_update) (void *engine, void *data, void *info, unsigned int w, unsigned int h);
1399 int (*output_update) (void *engine, void *data, void *info, unsigned int w, unsigned int h);
1400 1400
1401 void (*output_free) (void *engine, void *data); 1401 void (*output_free) (void *engine, void *data);
1402 void (*output_resize) (void *engine, void *data, int w, int h); 1402 void (*output_resize) (void *engine, void *data, int w, int h);
@@ -1616,6 +1616,8 @@ struct _Evas_Func
1616 1616
1617 Evas_Filter_Support (*gfx_filter_supports) (void *engine, Evas_Filter_Command *cmd); 1617 Evas_Filter_Support (*gfx_filter_supports) (void *engine, Evas_Filter_Command *cmd);
1618 Eina_Bool (*gfx_filter_process) (void *engine, Evas_Filter_Command *cmd); 1618 Eina_Bool (*gfx_filter_process) (void *engine, Evas_Filter_Command *cmd);
1619
1620 unsigned int info_size;
1619}; 1621};
1620 1622
1621struct _Evas_Image_Save_Func 1623struct _Evas_Image_Save_Func