evas: engine should not access Evas canvas directly.

This commit is contained in:
Cedric BAIL 2017-08-25 10:47:03 -07:00
parent 4b74a4cd55
commit 268d9984b4
17 changed files with 35 additions and 35 deletions

View File

@ -1044,7 +1044,7 @@ evas_output_method_set(Evas *eo_e, int render_method)
Eina_List *l;
EINA_LIST_FOREACH(e->outputs, l, output)
output->info = e->engine.func->info(eo_e);
if (!output->info) output->info = e->engine.func->info();
}
// Wayland/drm already handles seats.

View File

@ -40,7 +40,7 @@ efl_canvas_output_add(Evas *canvas)
// right away to setup the info structure
if (e->engine.func->info)
{
r->info = e->engine.func->info(canvas);
r->info = e->engine.func->info();
}
return r;
@ -62,7 +62,7 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
output->ector);
e->engine.func->output_free(_evas_engine_context(e),
output->output);
e->engine.func->info_free(output->canvas, output->info);
e->engine.func->info_free(output->info);
}
e->outputs = eina_list_remove(e->outputs, output);

View File

@ -1393,8 +1393,8 @@ struct _Evas_Object_Func
struct _Evas_Func
{
void *(*info) (Evas *e);
void (*info_free) (Evas *e, void *info);
void *(*info) (void);
void (*info_free) (void *info);
void *(*setup) (void *engine, void *info, unsigned int w, unsigned int h);
int (*update) (void *engine, void *data, void *info, unsigned int w, unsigned int h);

View File

@ -22,8 +22,8 @@ typedef Render_Engine_Software_Generic Render_Engine;
/* prototypes we will use here */
static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void *dest_buffer), void *switch_data);
static void *eng_info(Evas *eo_e EINA_UNUSED);
static void eng_info_free(Evas *eo_e EINA_UNUSED, void *info);
static void *eng_info(void);
static void eng_info_free(void *info);
static void eng_output_free(void *engine EINA_UNUSED, void *data);
/* internal engine routines */
@ -108,7 +108,7 @@ _output_setup(int w,
/* engine api this module provides */
static void *
eng_info(Evas *eo_e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Buffer *info;
info = calloc(1, sizeof(Evas_Engine_Info_Buffer));
@ -119,7 +119,7 @@ eng_info(Evas *eo_e EINA_UNUSED)
}
static void
eng_info_free(Evas *eo_e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_Buffer *in;
in = (Evas_Engine_Info_Buffer *)info;

View File

@ -58,7 +58,7 @@ err:
}
static void *
eng_info(Evas *evas EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Drm *info;
@ -74,7 +74,7 @@ eng_info(Evas *evas EINA_UNUSED)
}
static void
eng_info_free(Evas *evas EINA_UNUSED, void *einfo)
eng_info_free(void *einfo)
{
Evas_Engine_Info_Drm *info;

View File

@ -671,7 +671,7 @@ _native_cb_free(void *image)
/* engine specific override functions */
static void *
eng_info(Evas *eo_e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Eglfs *info;
@ -686,7 +686,7 @@ eng_info(Evas *eo_e EINA_UNUSED)
}
static void
eng_info_free(Evas *eo_e EINA_UNUSED, void *in)
eng_info_free(void *in)
{
Evas_Engine_Info_Eglfs *info;

View File

@ -62,7 +62,7 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh)
/* engine api this module provides */
static void *
eng_info(Evas *eo_e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_FB *info;
info = calloc(1, sizeof(Evas_Engine_Info_FB));
@ -73,7 +73,7 @@ eng_info(Evas *eo_e EINA_UNUSED)
}
static void
eng_info_free(Evas *eo_e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_FB *in;
in = (Evas_Engine_Info_FB *)info;

View File

@ -127,7 +127,7 @@ static const EVGL_Interface evgl_funcs =
static void *
eng_info(Evas *e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_GL_Cocoa *info;
@ -142,7 +142,7 @@ eng_info(Evas *e EINA_UNUSED)
}
static void
eng_info_free(Evas *e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_GL_Cocoa *const in = info;
free(in);

View File

@ -892,7 +892,7 @@ _native_cb_free(void *image)
/* engine specific override functions */
static void *
eng_info(Evas *eo_e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_GL_Drm *info;
@ -907,7 +907,7 @@ eng_info(Evas *eo_e EINA_UNUSED)
}
static void
eng_info_free(Evas *eo_e EINA_UNUSED, void *in)
eng_info_free(void *in)
{
Evas_Engine_Info_GL_Drm *info;

View File

@ -268,7 +268,7 @@ static const EVGL_Interface evgl_funcs =
static void *
eng_info(Evas *e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_GL_SDL *info;
@ -279,7 +279,7 @@ eng_info(Evas *e EINA_UNUSED)
}
static void
eng_info_free(Evas *e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_GL_SDL *in;
in = (Evas_Engine_Info_GL_SDL *)info;

View File

@ -1550,7 +1550,7 @@ int _evas_engine_GL_X11_log_dom = -1;
static Evas_Func func, pfunc;
static void *
eng_info(Evas *eo_e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_GL_X11 *info;
@ -1564,7 +1564,7 @@ eng_info(Evas *eo_e EINA_UNUSED)
}
static void
eng_info_free(Evas *eo_e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_GL_X11 *in;
// dont free! why bother? its not worth it

View File

@ -99,7 +99,7 @@ _output_setup(int w, int h)
/* engine api this module provides */
static void *
eng_info(Evas *e)
eng_info(void)
{
Evas_Engine_Info_PSL1GHT *info;
@ -115,7 +115,7 @@ eng_info(Evas *e)
}
static void
eng_info_free(Evas *e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_PSL1GHT *in;

View File

@ -67,7 +67,7 @@ _output_setup(int width,
/* engine api this module provides */
static void *
eng_info(Evas *e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Software_DDraw *info;
@ -79,7 +79,7 @@ eng_info(Evas *e EINA_UNUSED)
}
static void
eng_info_free(Evas *e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_Software_DDraw *in;

View File

@ -73,7 +73,7 @@ _output_setup(int width,
/* engine api this module provides */
static void *
eng_info(Evas *e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Software_Gdi *info;
info = calloc(1, sizeof(Evas_Engine_Info_Software_Gdi));
@ -83,7 +83,7 @@ eng_info(Evas *e EINA_UNUSED)
}
static void
eng_info_free(Evas *e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_Software_Gdi *in;
in = (Evas_Engine_Info_Software_Gdi *)info;

View File

@ -232,7 +232,7 @@ _symbols(void)
/* engine api this module provides */
static void *
eng_info(Evas *eo_e EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Software_X11 *info;
@ -251,7 +251,7 @@ eng_info(Evas *eo_e EINA_UNUSED)
}
static void
eng_info_free(Evas *eo_e EINA_UNUSED, void *info)
eng_info_free(void *info)
{
Evas_Engine_Info_Software_X11 *in;

View File

@ -503,7 +503,7 @@ static const EVGL_Interface evgl_funcs =
/* engine functions */
static void *
eng_info(Evas *evas EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Wayland *info;

View File

@ -103,7 +103,7 @@ _symbols(void)
/* ENGINE API FUNCTIONS WE PROVIDE */
static void *
eng_info(Evas *eo_evas EINA_UNUSED)
eng_info(void)
{
Evas_Engine_Info_Wayland *einfo;
@ -121,8 +121,8 @@ eng_info(Evas *eo_evas EINA_UNUSED)
return einfo;
}
static void
eng_info_free(Evas *eo_evas EINA_UNUSED, void *info)
static void
eng_info_free(void *info)
{
Evas_Engine_Info_Wayland *einfo;