forked from enlightenment/efl
evas: remove engine.data.output.
This is the first step toward handling multi output. This patch remove engine.data.output from Evas structure and use an Eina_List for it instead. It also start moving code around to fetch an output or an engine context (which are the same at the moment, but will be split in a later patch).
This commit is contained in:
parent
bc43eeba00
commit
55e1b3f205
|
@ -173,7 +173,7 @@ _evas_image_proxy_unset(Evas_Object *proxy, Evas_Object_Protected_Data *cur_prox
|
|||
if (eina_list_count(proxy_source_write->proxies) == 0)
|
||||
{
|
||||
if (proxy_source_write->surface)
|
||||
cur_proxy->layer->evas->engine.func->image_free(cur_proxy->layer->evas->engine.data.output,
|
||||
cur_proxy->layer->evas->engine.func->image_free(_evas_engine_context(cur_proxy->layer->evas),
|
||||
proxy_source_write->surface);
|
||||
proxy_source_write->surface = NULL;
|
||||
proxy_source_write->redraw = EINA_FALSE;
|
||||
|
|
|
@ -56,14 +56,14 @@ _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj,
|
|||
|
||||
if (e->engine.func->drawable_size_get)
|
||||
{
|
||||
e->engine.func->drawable_size_get(e->engine.data.output,
|
||||
e->engine.func->drawable_size_get(_evas_engine_context(e),
|
||||
pd_scene->surface, &w, &h);
|
||||
}
|
||||
if ((w != pd_scene->w) || (h != pd_scene->h))
|
||||
{
|
||||
if (e->engine.func->drawable_free)
|
||||
{
|
||||
e->engine.func->drawable_free(e->engine.data.output,
|
||||
e->engine.func->drawable_free(_evas_engine_context(e),
|
||||
pd_scene->surface);
|
||||
}
|
||||
pd_scene->surface = NULL;
|
||||
|
@ -76,8 +76,8 @@ _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj,
|
|||
if (e->engine.func->drawable_new)
|
||||
{
|
||||
pd_scene->surface =
|
||||
e->engine.func->drawable_new(e->engine.data.output,
|
||||
pd_scene->w, pd_scene->h, 1);
|
||||
e->engine.func->drawable_new(_evas_engine_context(e),
|
||||
pd_scene->w, pd_scene->h, 1);
|
||||
}
|
||||
need_native_set = EINA_TRUE;
|
||||
}
|
||||
|
@ -90,9 +90,9 @@ _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj,
|
|||
if (e->engine.func->image_drawable_set)
|
||||
{
|
||||
data->surface =
|
||||
e->engine.func->image_drawable_set(e->engine.data.output,
|
||||
data->surface,
|
||||
pd_scene->surface);
|
||||
e->engine.func->image_drawable_set(_evas_engine_context(e),
|
||||
data->surface,
|
||||
pd_scene->surface);
|
||||
}
|
||||
}
|
||||
data->w = pd_scene->w;
|
||||
|
@ -131,7 +131,7 @@ _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj,
|
|||
/* Phase 5 - Draw the scene. */
|
||||
if (e->engine.func->drawable_scene_render)
|
||||
{
|
||||
e->engine.func->drawable_scene_render(e->engine.data.output,
|
||||
e->engine.func->drawable_scene_render(_evas_engine_context(e),
|
||||
pd_scene->surface, &scene_data);
|
||||
}
|
||||
/* Clean up temporary resources. */
|
||||
|
@ -199,7 +199,7 @@ _evas_image_3d_unset(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data
|
|||
e = obj->layer->evas;
|
||||
|
||||
if (data->surface)
|
||||
e->engine.func->image_free(e->engine.data.output, data->surface);
|
||||
e->engine.func->image_free(_evas_engine_context(e), data->surface);
|
||||
|
||||
data->surface = NULL;
|
||||
data->w = 0;
|
||||
|
@ -251,7 +251,7 @@ _efl_canvas_scene3d_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
|
|||
|
||||
if (e->engine.func->drawable_size_get)
|
||||
{
|
||||
e->engine.func->drawable_size_get(e->engine.data.output,
|
||||
e->engine.func->drawable_size_get(_evas_engine_context(e),
|
||||
pd_scene->surface, &width, &height);
|
||||
}
|
||||
|
||||
|
|
|
@ -669,7 +669,7 @@ _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real
|
|||
|
||||
if (e->engine.func->drawable_scene_render_to_texture)
|
||||
{
|
||||
if (e->engine.func->drawable_scene_render_to_texture(e->engine.data.output,
|
||||
if (e->engine.func->drawable_scene_render_to_texture(_evas_engine_context(e),
|
||||
pd->surface, &scene_data))
|
||||
{
|
||||
if (e->engine.func->drawable_texture_color_pick_id_get)
|
||||
|
|
|
@ -31,7 +31,7 @@ _texture_proxy_unset(Evas_Canvas3D_Texture_Data *texture)
|
|||
proxy_src->surface != NULL)
|
||||
{
|
||||
Evas_Public_Data *e = src->layer->evas;
|
||||
e->engine.func->image_free(e->engine.data.output, proxy_src->surface);
|
||||
e->engine.func->image_free(_evas_engine_context(e), proxy_src->surface);
|
||||
proxy_src->surface = NULL;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
|
|||
if (is_image)
|
||||
{
|
||||
void *image = source->func->engine_data_get(pd->source);
|
||||
e->engine.func->image_size_get(e->engine.data.output, image, &w, &h);
|
||||
e->engine.func->image_size_get(_evas_engine_context(e), image, &w, &h);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
|
|||
if ((proxy_write->surface) &&
|
||||
((proxy_write->w != w) || (proxy_write->h != h)))
|
||||
{
|
||||
e->engine.func->image_free(e->engine.data.output, proxy_write->surface);
|
||||
e->engine.func->image_free(_evas_engine_context(e), proxy_write->surface);
|
||||
proxy_write->surface = NULL;
|
||||
}
|
||||
|
||||
|
@ -99,23 +99,23 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
|
|||
if (!proxy_write->surface)
|
||||
{
|
||||
proxy_write->surface = e->engine.func->image_map_surface_new
|
||||
(e->engine.data.output, w, h, 1);
|
||||
(_evas_engine_context(e), w, h, 1);
|
||||
if (!proxy_write->surface) goto end;
|
||||
proxy_write->w = w;
|
||||
proxy_write->h = h;
|
||||
}
|
||||
|
||||
ctx = e->engine.func->context_new(e->engine.data.output);
|
||||
e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0,
|
||||
ctx = e->engine.func->context_new(_evas_default_output_get(e));
|
||||
e->engine.func->context_color_set(_evas_default_output_get(e), ctx, 0, 0,
|
||||
0, 0);
|
||||
e->engine.func->context_render_op_set(e->engine.data.output, ctx,
|
||||
e->engine.func->context_render_op_set(_evas_default_output_get(e), ctx,
|
||||
EVAS_RENDER_COPY);
|
||||
e->engine.func->rectangle_draw(e->engine.data.output, ctx,
|
||||
e->engine.func->rectangle_draw(_evas_default_output_get(e), ctx,
|
||||
proxy_write->surface, 0, 0, w, h,
|
||||
EINA_FALSE);
|
||||
e->engine.func->context_free(e->engine.data.output, ctx);
|
||||
e->engine.func->context_free(_evas_default_output_get(e), ctx);
|
||||
|
||||
ctx = e->engine.func->context_new(e->engine.data.output);
|
||||
ctx = e->engine.func->context_new(_evas_default_output_get(e));
|
||||
|
||||
if (is_image)
|
||||
{
|
||||
|
@ -124,9 +124,9 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
|
|||
if (image)
|
||||
{
|
||||
int imagew, imageh;
|
||||
e->engine.func->image_size_get(e->engine.data.output, image,
|
||||
e->engine.func->image_size_get(_evas_engine_context(e), image,
|
||||
&imagew, &imageh);
|
||||
e->engine.func->image_draw(e->engine.data.output, ctx,
|
||||
e->engine.func->image_draw(_evas_default_output_get(e), ctx,
|
||||
proxy_write->surface, image,
|
||||
0, 0, imagew, imageh, 0, 0, w, h, 0, EINA_FALSE);
|
||||
}
|
||||
|
@ -148,9 +148,9 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
|
|||
&proxy_render_data, 1, EINA_FALSE);
|
||||
}
|
||||
|
||||
e->engine.func->context_free(e->engine.data.output, ctx);
|
||||
e->engine.func->context_free(_evas_default_output_get(e), ctx);
|
||||
proxy_write->surface = e->engine.func->image_dirty_region
|
||||
(e->engine.data.output, proxy_write->surface, 0, 0, w, h);
|
||||
(_evas_default_output_get(e), proxy_write->surface, 0, 0, w, h);
|
||||
}
|
||||
end:
|
||||
EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write);
|
||||
|
@ -172,7 +172,7 @@ _texture_fini(Evas_Canvas3D_Texture *obj)
|
|||
{
|
||||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
if (e->engine.func->texture_free)
|
||||
e->engine.func->texture_free(e->engine.data.output, pd->engine_data);
|
||||
e->engine.func->texture_free(_evas_engine_context(e), pd->engine_data);
|
||||
pd->engine_data = NULL;
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D
|
|||
if (e->engine.func->texture_new)
|
||||
{
|
||||
pd->engine_data =
|
||||
e->engine.func->texture_new(e->engine.data.output, pd->atlas_enable);
|
||||
e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
|
||||
}
|
||||
|
||||
if (pd->engine_data == NULL)
|
||||
|
@ -247,7 +247,7 @@ _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D
|
|||
{
|
||||
if (e->engine.func->texture_image_set)
|
||||
{
|
||||
e->engine.func->texture_image_set(e->engine.data.output,
|
||||
e->engine.func->texture_image_set(_evas_engine_context(e),
|
||||
pd->engine_data,
|
||||
src->proxy->surface);
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D
|
|||
_texture_proxy_subrender(obj);
|
||||
|
||||
if (e->engine.func->texture_image_set)
|
||||
e->engine.func->texture_image_set(e->engine.data.output,
|
||||
e->engine.func->texture_image_set(_evas_engine_context(e),
|
||||
pd->engine_data,
|
||||
src->proxy->surface);
|
||||
pd->proxy_rendering = EINA_FALSE;
|
||||
|
@ -347,14 +347,14 @@ _evas_canvas3d_texture_data_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd,
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
|
||||
if (!pd->engine_data && e->engine.func->texture_new)
|
||||
pd->engine_data = e->engine.func->texture_new(e->engine.data.output, pd->atlas_enable);
|
||||
pd->engine_data = e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
|
||||
if (!data)
|
||||
{
|
||||
ERR("Failure, image data is empty");
|
||||
return;
|
||||
}
|
||||
|
||||
image = e->engine.func->image_new_from_data(e->engine.data.output, w, h, (DATA32 *)data, EINA_TRUE, color_format);
|
||||
image = e->engine.func->image_new_from_data(_evas_engine_context(e), w, h, (DATA32 *)data, EINA_TRUE, color_format);
|
||||
if (!image)
|
||||
{
|
||||
ERR("Can't load image from data");
|
||||
|
@ -362,10 +362,10 @@ _evas_canvas3d_texture_data_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd,
|
|||
}
|
||||
|
||||
if (e->engine.func->texture_image_set)
|
||||
e->engine.func->texture_image_set(e->engine.data.output,
|
||||
e->engine.func->texture_image_set(_evas_engine_context(e),
|
||||
pd->engine_data,
|
||||
image);
|
||||
e->engine.func->image_free(e->engine.data.output, image);
|
||||
e->engine.func->image_free(_evas_engine_context(e), image);
|
||||
evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
|
||||
}
|
||||
|
||||
|
@ -382,10 +382,10 @@ _evas_canvas3d_texture_file_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, const c
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
|
||||
if (!pd->engine_data && e->engine.func->texture_new)
|
||||
pd->engine_data = e->engine.func->texture_new(e->engine.data.output, pd->atlas_enable);
|
||||
pd->engine_data = e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
|
||||
|
||||
memset(&lo, 0x0, sizeof(Evas_Image_Load_Opts));
|
||||
image = e->engine.func->image_load(e->engine.data.output,
|
||||
image = e->engine.func->image_load(_evas_engine_context(e),
|
||||
file, key, &load_error, &lo);
|
||||
if (!image)
|
||||
{
|
||||
|
@ -394,11 +394,11 @@ _evas_canvas3d_texture_file_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, const c
|
|||
}
|
||||
|
||||
if (e->engine.func->texture_image_set)
|
||||
e->engine.func->texture_image_set(e->engine.data.output,
|
||||
e->engine.func->texture_image_set(_evas_engine_context(e),
|
||||
pd->engine_data,
|
||||
image);
|
||||
|
||||
e->engine.func->image_free(e->engine.data.output, image);
|
||||
e->engine.func->image_free(_evas_engine_context(e), image);
|
||||
evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ _evas_canvas3d_texture_source_set(Eo *obj , Evas_Canvas3D_Texture_Data *pd, Evas
|
|||
return;
|
||||
}
|
||||
if (!pd->engine_data && e->engine.func->texture_new)
|
||||
pd->engine_data = e->engine.func->texture_new(e->engine.data.output, pd->atlas_enable);
|
||||
pd->engine_data = e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
|
||||
|
||||
_texture_proxy_set(obj, source, src);
|
||||
evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
|
||||
|
@ -491,8 +491,8 @@ _evas_canvas3d_texture_color_format_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D
|
|||
{
|
||||
void *image;
|
||||
|
||||
image = e->engine.func->texture_image_get(e->engine.data.output, pd->engine_data);
|
||||
format = e->engine.func->image_colorspace_get(e->engine.data.output, image);
|
||||
image = e->engine.func->texture_image_get(_evas_engine_context(e), pd->engine_data);
|
||||
format = e->engine.func->image_colorspace_get(_evas_engine_context(e), image);
|
||||
}
|
||||
|
||||
return format;
|
||||
|
@ -506,7 +506,7 @@ _evas_canvas3d_texture_size_get(const Eo *obj, Evas_Canvas3D_Texture_Data *pd, i
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
if (e->engine.func->texture_size_get)
|
||||
{
|
||||
e->engine.func->texture_size_get(e->engine.data.output,
|
||||
e->engine.func->texture_size_get(_evas_engine_context(e),
|
||||
pd->engine_data, w, h);
|
||||
}
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ _evas_canvas3d_texture_wrap_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Ca
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
if (e->engine.func->texture_wrap_set)
|
||||
{
|
||||
e->engine.func->texture_wrap_set(e->engine.data.output,
|
||||
e->engine.func->texture_wrap_set(_evas_engine_context(e),
|
||||
pd->engine_data, s, t);
|
||||
}
|
||||
evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_WRAP, NULL);
|
||||
|
@ -533,7 +533,7 @@ _evas_canvas3d_texture_wrap_get(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Ca
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
if (e->engine.func->texture_wrap_set)
|
||||
{
|
||||
e->engine.func->texture_wrap_get(e->engine.data.output,
|
||||
e->engine.func->texture_wrap_get(_evas_engine_context(e),
|
||||
pd->engine_data, s, t);
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ _evas_canvas3d_texture_filter_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
if (e->engine.func->texture_filter_set)
|
||||
{
|
||||
e->engine.func->texture_filter_set(e->engine.data.output,
|
||||
e->engine.func->texture_filter_set(_evas_engine_context(e),
|
||||
pd->engine_data, min, mag);
|
||||
}
|
||||
evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_FILTER, NULL);
|
||||
|
@ -560,7 +560,7 @@ _evas_canvas3d_texture_filter_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Textu
|
|||
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
|
||||
if (e->engine.func->texture_filter_get)
|
||||
{
|
||||
e->engine.func->texture_filter_get(e->engine.data.output,
|
||||
e->engine.func->texture_filter_get(_evas_engine_context(e),
|
||||
pd->engine_data, min, mag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ _efl_canvas_object_clip_mask_unset(Evas_Object_Protected_Data *obj)
|
|||
mask->is_alpha = EINA_FALSE;
|
||||
if (mask->surface)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, mask->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, mask->surface);
|
||||
mask->surface = NULL;
|
||||
}
|
||||
mask->w = 0;
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
#define MY_CLASS EFL_CANVAS_FILTER_INTERNAL_MIXIN
|
||||
|
||||
#define ENFN obj->layer->evas->engine.func
|
||||
#define ENDT obj->layer->evas->engine.data.output
|
||||
|
||||
#define FCOW_BEGIN(_pd) ({ Evas_Object_Filter_Data *_fcow = eina_cow_write(evas_object_filter_cow, (const Eina_Cow_Data**)&(_pd->data)); _state_check(_fcow); _fcow; })
|
||||
#define FCOW_END(_fcow, _pd) eina_cow_done(evas_object_filter_cow, (const Eina_Cow_Data**)&(_pd->data), _fcow, EINA_TRUE)
|
||||
#define FCOW_WRITE(pd, name, value) do { \
|
||||
|
@ -121,7 +118,7 @@ _filter_end_sync(Evas_Filter_Context *ctx, Evas_Object_Protected_Data *obj,
|
|||
}
|
||||
|
||||
if (previous)
|
||||
ENFN->image_free(ENDT, previous);
|
||||
ENFN->image_free(ENC, previous);
|
||||
|
||||
if (destroy)
|
||||
{
|
||||
|
@ -285,7 +282,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
int iw, ih;
|
||||
|
||||
use_map = EINA_TRUE;
|
||||
ENFN->image_size_get(ENDT, previous, &iw, &ih);
|
||||
ENFN->image_size_get(ENC, previous, &iw, &ih);
|
||||
evas_object_map_update(eo_obj, x, y, iw, ih, iw, ih);
|
||||
}
|
||||
|
||||
|
@ -728,7 +725,7 @@ _efl_canvas_filter_internal_efl_object_destructor(Eo *eo_obj, Evas_Filter_Data *
|
|||
if (pd->data->output)
|
||||
{
|
||||
if (!pd->data->async)
|
||||
ENFN->image_free(ENDT, pd->data->output);
|
||||
ENFN->image_free(ENC, pd->data->output);
|
||||
else
|
||||
evas_unref_queue_image_put(e, pd->data->output);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ evas_fonts_zero_free(Evas *eo_evas)
|
|||
if (fd->fdesc) evas_font_desc_unref(fd->fdesc);
|
||||
if (fd->source) eina_stringshare_del(fd->source);
|
||||
if ((evas->engine.func) && (evas->engine.func->font_free))
|
||||
evas->engine.func->font_free(evas->engine.data.output, fd->font);
|
||||
evas->engine.func->font_free(_evas_engine_context(evas), fd->font);
|
||||
#ifdef HAVE_FONTCONFIG
|
||||
if (fd->set) FcFontSetDestroy(fd->set);
|
||||
if (fd->p_nm) FcPatternDestroy(fd->p_nm);
|
||||
|
@ -172,7 +172,7 @@ evas_fonts_zero_pressure(Evas *eo_evas)
|
|||
if (fd->fdesc) evas_font_desc_unref(fd->fdesc);
|
||||
if (fd->source) eina_stringshare_del(fd->source);
|
||||
if ((evas->engine.func) && (evas->engine.func->font_free))
|
||||
evas->engine.func->font_free(evas->engine.data.output, fd->font);
|
||||
evas->engine.func->font_free(_evas_engine_context(evas), fd->font);
|
||||
#ifdef HAVE_FONTCONFIG
|
||||
if (fd->set) FcFontSetDestroy(fd->set);
|
||||
if (fd->p_nm) FcPatternDestroy(fd->p_nm);
|
||||
|
@ -213,7 +213,7 @@ evas_font_free(Evas *eo_evas, void *font)
|
|||
|
||||
if (fd->fdesc) evas_font_desc_unref(fd->fdesc);
|
||||
if (fd->source) eina_stringshare_del(fd->source);
|
||||
evas->engine.func->font_free(evas->engine.data.output, fd->font);
|
||||
evas->engine.func->font_free(_evas_engine_context(evas), fd->font);
|
||||
#ifdef HAVE_FONTCONFIG
|
||||
if (fd->set) FcFontSetDestroy(fd->set);
|
||||
if (fd->p_nm) FcPatternDestroy(fd->p_nm);
|
||||
|
@ -240,9 +240,9 @@ _evas_load_fontconfig(Evas_Font_Set *font, Evas *eo_evas, FcFontSet *set, int si
|
|||
FcPatternGet(set->fonts[i], FC_FILE, 0, &filename);
|
||||
|
||||
if (font)
|
||||
evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size, wanted_rend);
|
||||
evas->engine.func->font_add(_evas_engine_context(evas), font, (char *)filename.u.s, size, wanted_rend);
|
||||
else
|
||||
font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend);
|
||||
font = evas->engine.func->font_load(_evas_engine_context(evas), (char *)filename.u.s, size, wanted_rend);
|
||||
}
|
||||
|
||||
return font;
|
||||
|
@ -648,7 +648,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
fake_name = evas_file_path_join(source, nm);
|
||||
if (fake_name)
|
||||
{
|
||||
font = evas->engine.func->font_load(evas->engine.data.output, fake_name, size, wanted_rend);
|
||||
font = evas->engine.func->font_load(_evas_engine_context(evas), fake_name, size, wanted_rend);
|
||||
if (!font) /* Load from fake name failed, probably not cached */
|
||||
{
|
||||
/* read original!!! */
|
||||
|
@ -661,7 +661,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
fdata = eet_read(ef, nm, &fsize);
|
||||
if (fdata)
|
||||
{
|
||||
font = evas->engine.func->font_memory_load(evas->engine.data.output, source, nm, size, fdata, fsize, wanted_rend);
|
||||
font = evas->engine.func->font_memory_load(_evas_engine_context(evas), source, nm, size, fdata, fsize, wanted_rend);
|
||||
free(fdata);
|
||||
}
|
||||
eet_close(ef);
|
||||
|
@ -673,7 +673,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
if (!font) /* Source load failed */
|
||||
{
|
||||
if (evas_file_path_is_full_path((char *)nm)) /* Try filename */
|
||||
font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size, wanted_rend);
|
||||
font = evas->engine.func->font_load(_evas_engine_context(evas), (char *)nm, size, wanted_rend);
|
||||
else /* search font path */
|
||||
{
|
||||
Eina_List *ll;
|
||||
|
@ -686,7 +686,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
f_file = evas_font_dir_cache_find(dir, (char *)nm);
|
||||
if (f_file)
|
||||
{
|
||||
font = evas->engine.func->font_load(evas->engine.data.output, f_file, size, wanted_rend);
|
||||
font = evas->engine.func->font_load(_evas_engine_context(evas), f_file, size, wanted_rend);
|
||||
if (font) break;
|
||||
}
|
||||
}
|
||||
|
@ -700,7 +700,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
f_file = evas_font_dir_cache_find(dir, (char *)nm);
|
||||
if (f_file)
|
||||
{
|
||||
font = evas->engine.func->font_load(evas->engine.data.output, f_file, size, wanted_rend);
|
||||
font = evas->engine.func->font_load(_evas_engine_context(evas), f_file, size, wanted_rend);
|
||||
if (font) break;
|
||||
}
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
if (fake_name)
|
||||
{
|
||||
/* FIXME: make an engine func */
|
||||
if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size, wanted_rend))
|
||||
if (!evas->engine.func->font_add(_evas_engine_context(evas), font, fake_name, size, wanted_rend))
|
||||
{
|
||||
/* read original!!! */
|
||||
ef = eet_open(source, EET_FILE_MODE_READ);
|
||||
|
@ -733,7 +733,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
fdata = eet_read(ef, nm, &fsize);
|
||||
if ((fdata) && (fsize > 0))
|
||||
{
|
||||
ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, source, nm, size, fdata, fsize, wanted_rend);
|
||||
ok = evas->engine.func->font_memory_add(_evas_engine_context(evas), font, source, nm, size, fdata, fsize, wanted_rend);
|
||||
}
|
||||
eet_close(ef);
|
||||
free(fdata);
|
||||
|
@ -747,7 +747,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
if (!ok)
|
||||
{
|
||||
if (evas_file_path_is_full_path((char *)nm))
|
||||
evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size, wanted_rend);
|
||||
evas->engine.func->font_add(_evas_engine_context(evas), font, (char *)nm, size, wanted_rend);
|
||||
else
|
||||
{
|
||||
Eina_List *ll;
|
||||
|
@ -761,7 +761,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
f_file = evas_font_dir_cache_find(dir, (char *)nm);
|
||||
if (f_file)
|
||||
{
|
||||
fn = (RGBA_Font *)evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, wanted_rend);
|
||||
fn = (RGBA_Font *)evas->engine.func->font_add(_evas_engine_context(evas), font, f_file, size, wanted_rend);
|
||||
if (fn)
|
||||
break;
|
||||
}
|
||||
|
@ -776,7 +776,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
f_file = evas_font_dir_cache_find(dir, (char *)nm);
|
||||
if (f_file)
|
||||
{
|
||||
fn = (RGBA_Font *)evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, wanted_rend);
|
||||
fn = (RGBA_Font *)evas->engine.func->font_add(_evas_engine_context(evas), font, f_file, size, wanted_rend);
|
||||
if (fn)
|
||||
break;
|
||||
}
|
||||
|
@ -901,7 +901,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source,
|
|||
}
|
||||
|
||||
if (font)
|
||||
evas->engine.func->font_hinting_set(evas->engine.data.output, font,
|
||||
evas->engine.func->font_hinting_set(_evas_engine_context(evas), font,
|
||||
evas->hinting);
|
||||
return font;
|
||||
}
|
||||
|
@ -910,7 +910,7 @@ void
|
|||
evas_font_load_hinting_set(Evas *eo_evas, void *font, int hinting)
|
||||
{
|
||||
Evas_Public_Data *evas = efl_data_scope_get(eo_evas, EVAS_CANVAS_CLASS);
|
||||
evas->engine.func->font_hinting_set(evas->engine.data.output, font,
|
||||
evas->engine.func->font_hinting_set(_evas_engine_context(evas), font,
|
||||
hinting);
|
||||
}
|
||||
|
||||
|
@ -1472,9 +1472,9 @@ _evas_canvas_font_hinting_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
|||
EOLIAN Eina_Bool
|
||||
_evas_canvas_font_hinting_can_hint(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Font_Hinting_Flags hinting)
|
||||
{
|
||||
if (e->engine.func->font_hinting_can_hint && e->engine.data.output)
|
||||
return e->engine.func->font_hinting_can_hint(e->engine.data.output,
|
||||
hinting);
|
||||
if (e->engine.func->font_hinting_can_hint && _evas_engine_context(e))
|
||||
return e->engine.func->font_hinting_can_hint(_evas_engine_context(e),
|
||||
hinting);
|
||||
else return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -1483,8 +1483,8 @@ _evas_canvas_font_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
|||
{
|
||||
evas_canvas_async_block(e);
|
||||
evas_render_rendering_wait(e);
|
||||
if (e->engine.data.output)
|
||||
e->engine.func->font_cache_flush(e->engine.data.output);
|
||||
if (_evas_engine_context(e))
|
||||
e->engine.func->font_cache_flush(_evas_engine_context(e));
|
||||
}
|
||||
|
||||
EOLIAN void
|
||||
|
@ -1493,15 +1493,15 @@ _evas_canvas_font_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size)
|
|||
if (size < 0) size = 0;
|
||||
evas_canvas_async_block(e);
|
||||
evas_render_rendering_wait(e);
|
||||
if (e->engine.data.output)
|
||||
e->engine.func->font_cache_set(e->engine.data.output, size);
|
||||
if (_evas_engine_context(e))
|
||||
e->engine.func->font_cache_set(_evas_engine_context(e), size);
|
||||
}
|
||||
|
||||
EOLIAN int
|
||||
_evas_canvas_font_cache_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
||||
{
|
||||
if (e->engine.data.output)
|
||||
return e->engine.func->font_cache_get(e->engine.data.output);
|
||||
if (_evas_engine_context(e))
|
||||
return e->engine.func->font_cache_get(_evas_engine_context(e));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int
|
|||
return NULL;
|
||||
}
|
||||
|
||||
surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height);
|
||||
surf->data = evas_gl->evas->engine.func->gl_surface_create(_evas_engine_context(evas_gl->evas), config, width, height);
|
||||
|
||||
if (!surf->data)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ evas_gl_pbuffer_surface_create(Evas_GL *evas_gl, Evas_GL_Config *cfg,
|
|||
}
|
||||
|
||||
surf->data = evas_gl->evas->engine.func->gl_pbuffer_surface_create
|
||||
(evas_gl->evas->engine.data.output, cfg, w, h, attrib_list);
|
||||
(_evas_engine_context(evas_gl->evas), cfg, w, h, attrib_list);
|
||||
if (!surf->data)
|
||||
{
|
||||
ERR("Engine failed to create a PBuffer!");
|
||||
|
@ -333,7 +333,7 @@ evas_gl_surface_destroy(Evas_GL *evas_gl, Evas_GL_Surface *surf)
|
|||
}
|
||||
|
||||
// Call Engine's Surface Destroy
|
||||
evas_gl->evas->engine.func->gl_surface_destroy(evas_gl->evas->engine.data.output, surf->data);
|
||||
evas_gl->evas->engine.func->gl_surface_destroy(_evas_engine_context(evas_gl->evas), surf->data);
|
||||
|
||||
// Remove it from the list
|
||||
LKL(evas_gl->lck);
|
||||
|
@ -362,7 +362,7 @@ evas_gl_engine_data_get(void *evgl)
|
|||
if (!evasgl) return NULL;
|
||||
if (!evasgl->evas) return NULL;
|
||||
|
||||
return evasgl->evas->engine.data.output;
|
||||
return _evas_engine_context(evasgl->evas);
|
||||
}
|
||||
|
||||
EAPI Evas_GL_Context *
|
||||
|
@ -396,8 +396,8 @@ evas_gl_context_version_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx,
|
|||
// Call engine->gl_create_context
|
||||
ctx->version = version;
|
||||
ctx->data = evas_gl->evas->engine.func->gl_context_create
|
||||
(evas_gl->evas->engine.data.output, share_ctx ? share_ctx->data : NULL,
|
||||
version, &evas_gl_native_context_get, &evas_gl_engine_data_get);
|
||||
(_evas_engine_context(evas_gl->evas), share_ctx ? share_ctx->data : NULL,
|
||||
version, &evas_gl_native_context_get, &evas_gl_engine_data_get);
|
||||
|
||||
// Set a few variables
|
||||
if (!ctx->data)
|
||||
|
@ -437,7 +437,7 @@ evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx)
|
|||
}
|
||||
|
||||
// Call Engine's destroy
|
||||
evas_gl->evas->engine.func->gl_context_destroy(evas_gl->evas->engine.data.output, ctx->data);
|
||||
evas_gl->evas->engine.func->gl_context_destroy(_evas_engine_context(evas_gl->evas), ctx->data);
|
||||
|
||||
// Remove it from the list
|
||||
LKL(evas_gl->lck);
|
||||
|
@ -459,11 +459,11 @@ evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *c
|
|||
MAGIC_CHECK_END();
|
||||
|
||||
if ((surf) && (ctx))
|
||||
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, surf->data, ctx->data);
|
||||
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(_evas_engine_context(evas_gl->evas), surf->data, ctx->data);
|
||||
else if ((!surf) && (!ctx))
|
||||
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, NULL, NULL);
|
||||
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(_evas_engine_context(evas_gl->evas), NULL, NULL);
|
||||
else if ((!surf) && (ctx)) // surfaceless make current
|
||||
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, NULL, ctx->data);
|
||||
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(_evas_engine_context(evas_gl->evas), NULL, ctx->data);
|
||||
else
|
||||
{
|
||||
ERR("Bad match between surface: %p and context: %p", surf, ctx);
|
||||
|
@ -496,7 +496,7 @@ evas_gl_current_context_get(Evas_GL *evas_gl)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
internal_ctx = evas_gl->evas->engine.func->gl_current_context_get(evas_gl->evas->engine.data.output);
|
||||
internal_ctx = evas_gl->evas->engine.func->gl_current_context_get(_evas_engine_context(evas_gl->evas));
|
||||
if (!internal_ctx)
|
||||
return NULL;
|
||||
|
||||
|
@ -534,7 +534,7 @@ evas_gl_current_surface_get(Evas_GL *evas_gl)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
internal_sfc = evas_gl->evas->engine.func->gl_current_surface_get(evas_gl->evas->engine.data.output);
|
||||
internal_sfc = evas_gl->evas->engine.func->gl_current_surface_get(_evas_engine_context(evas_gl->evas));
|
||||
if (!internal_sfc)
|
||||
return NULL;
|
||||
|
||||
|
@ -580,7 +580,7 @@ evas_gl_string_query(Evas_GL *evas_gl, int name)
|
|||
return "";
|
||||
MAGIC_CHECK_END();
|
||||
|
||||
return evas_gl->evas->engine.func->gl_string_query(evas_gl->evas->engine.data.output, name);
|
||||
return evas_gl->evas->engine.func->gl_string_query(_evas_engine_context(evas_gl->evas), name);
|
||||
}
|
||||
|
||||
EAPI Evas_GL_Func
|
||||
|
@ -590,7 +590,7 @@ evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name)
|
|||
return NULL;
|
||||
MAGIC_CHECK_END();
|
||||
|
||||
return (Evas_GL_Func)evas_gl->evas->engine.func->gl_proc_address_get(evas_gl->evas->engine.data.output, name);
|
||||
return (Evas_GL_Func)evas_gl->evas->engine.func->gl_proc_address_get(_evas_engine_context(evas_gl->evas), name);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
@ -614,7 +614,7 @@ evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
return (Eina_Bool)evas_gl->evas->engine.func->gl_native_surface_get(evas_gl->evas->engine.data.output, surf->data, ns);
|
||||
return (Eina_Bool)evas_gl->evas->engine.func->gl_native_surface_get(_evas_engine_context(evas_gl->evas), surf->data, ns);
|
||||
}
|
||||
|
||||
|
||||
|
@ -625,7 +625,7 @@ evas_gl_api_get(Evas_GL *evas_gl)
|
|||
return NULL;
|
||||
MAGIC_CHECK_END();
|
||||
|
||||
return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(evas_gl->evas->engine.data.output, EVAS_GL_GLES_2_X);
|
||||
return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(_evas_engine_context(evas_gl->evas), EVAS_GL_GLES_2_X);
|
||||
}
|
||||
|
||||
EAPI Evas_GL_API *
|
||||
|
@ -641,7 +641,7 @@ evas_gl_context_api_get(Evas_GL *evas_gl, Evas_GL_Context *ctx)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(evas_gl->evas->engine.data.output, ctx->version);
|
||||
return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(_evas_engine_context(evas_gl->evas), ctx->version);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
@ -654,7 +654,7 @@ evas_gl_rotation_get(Evas_GL *evas_gl)
|
|||
if (!evas_gl->evas->engine.func->gl_rotation_angle_get)
|
||||
return 0;
|
||||
|
||||
return evas_gl->evas->engine.func->gl_rotation_angle_get(evas_gl->evas->engine.data.output);
|
||||
return evas_gl->evas->engine.func->gl_rotation_angle_get(_evas_engine_context(evas_gl->evas));
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
@ -672,7 +672,7 @@ evas_gl_error_get(Evas_GL *evas_gl)
|
|||
if (!evas_gl->evas->engine.func->gl_error_get)
|
||||
err = EVAS_GL_NOT_INITIALIZED;
|
||||
else
|
||||
err = evas_gl->evas->engine.func->gl_error_get(evas_gl->evas->engine.data.output);
|
||||
err = evas_gl->evas->engine.func->gl_error_get(_evas_engine_context(evas_gl->evas));
|
||||
|
||||
end:
|
||||
/* Call to evas_gl_error_get() should set error to EVAS_GL_SUCCESS */
|
||||
|
@ -703,5 +703,5 @@ evas_gl_surface_query(Evas_GL *evas_gl, Evas_GL_Surface *surface, int attribute,
|
|||
}
|
||||
|
||||
return evas_gl->evas->engine.func->gl_surface_query
|
||||
(evas_gl->evas->engine.data.output, surface->data, attribute, value);
|
||||
(_evas_engine_context(evas_gl->evas), surface->data, attribute, value);
|
||||
}
|
||||
|
|
|
@ -213,10 +213,6 @@ void *_evas_image_data_convert_internal(Evas_Image_Data *o, void *data, Evas_Col
|
|||
void _evas_image_unload(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool dirty);
|
||||
void _evas_image_load(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o);
|
||||
|
||||
/* save typing */
|
||||
#define ENFN obj->layer->evas->engine.func
|
||||
#define ENDT obj->layer->evas->engine.data.output
|
||||
|
||||
# define EINA_COW_IMAGE_STATE_WRITE_BEGIN(Obj, Write) \
|
||||
EINA_COW_WRITE_BEGIN(evas_object_image_state_cow, Obj->cur, Evas_Object_Image_State, Write)
|
||||
|
||||
|
|
|
@ -350,13 +350,6 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
|
|||
|
||||
EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
|
||||
|
||||
if (e->engine.func)
|
||||
{
|
||||
e->engine.func->ector_destroy(e->engine.data.output,
|
||||
e->engine.ector);
|
||||
e->engine.func->output_free(e->engine.data.output);
|
||||
e->engine.func->info_free(eo_e, e->engine.info);
|
||||
}
|
||||
if (e->common_init)
|
||||
{
|
||||
e->common_init = 0;
|
||||
|
@ -419,58 +412,35 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
|
|||
efl_destructor(efl_super(eo_e, MY_CLASS));
|
||||
}
|
||||
|
||||
// It is now expected that the first output in the list is the default one
|
||||
// manipulated by this set of legacy API
|
||||
|
||||
EAPI Evas_Engine_Info *
|
||||
evas_engine_info_get(const Evas *obj)
|
||||
{
|
||||
const Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
|
||||
Evas_Engine_Info *info;
|
||||
Efl_Canvas_Output *output;
|
||||
|
||||
if (!e->engine.info) return NULL;
|
||||
output = eina_list_data_get(e->outputs);
|
||||
if (!output)
|
||||
{
|
||||
output = efl_canvas_output_add((Evas*) obj);
|
||||
}
|
||||
if (!output) return NULL;
|
||||
|
||||
info = e->engine.info;
|
||||
((Evas_Public_Data *)e)->engine.info_magic = info->magic;
|
||||
|
||||
return info;
|
||||
return efl_canvas_output_engine_info_get(output);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
evas_engine_info_set(Evas *obj, Evas_Engine_Info *info)
|
||||
{
|
||||
Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
|
||||
Efl_Canvas_Output *output;
|
||||
|
||||
output = eina_list_data_get(e->outputs);
|
||||
if (!output) return EINA_FALSE;
|
||||
if (!info) return EINA_FALSE;
|
||||
if (info != e->engine.info) return EINA_FALSE;
|
||||
if (info->magic != e->engine.info_magic) return EINA_FALSE;
|
||||
|
||||
evas_canvas_async_block(e);
|
||||
|
||||
if (e->engine.data.output)
|
||||
{
|
||||
if (e->engine.func->update)
|
||||
{
|
||||
e->engine.func->update(e->engine.data.output, info, e->output.w, e->output.h);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For engine who do not provide an update function
|
||||
e->engine.func->output_free(e->engine.data.output);
|
||||
|
||||
goto setup;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!e->common_init)
|
||||
{
|
||||
e->common_init = 1;
|
||||
evas_common_init();
|
||||
}
|
||||
|
||||
setup:
|
||||
e->engine.data.output = e->engine.func->setup(info, e->output.w, e->output.h);
|
||||
}
|
||||
|
||||
return !!e->engine.data.output;
|
||||
return efl_canvas_output_engine_info_set(output, info);
|
||||
}
|
||||
|
||||
EOLIAN static Evas_Coord
|
||||
|
@ -831,11 +801,19 @@ _evas_canvas_efl_loop_user_loop_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e EI
|
|||
}
|
||||
|
||||
Ector_Surface *
|
||||
evas_ector_get(Evas_Public_Data *e)
|
||||
evas_ector_get(Evas_Public_Data *e, void *output)
|
||||
{
|
||||
if (!e->engine.ector)
|
||||
e->engine.ector = e->engine.func->ector_create(e->engine.data.output);
|
||||
return e->engine.ector;
|
||||
Efl_Canvas_Output *r;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(e->outputs, l, r)
|
||||
if (r->output == output)
|
||||
{
|
||||
if (!r->ector)
|
||||
r->ector = e->engine.func->ector_create(_evas_engine_context(e), output);
|
||||
return r->ector;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -868,11 +846,11 @@ _image_data_unset(Evas_Object_Protected_Data *obj, Eina_List **list)
|
|||
obj->layer->evas->engine.func->ector_free(data->engine_data))
|
||||
else CHECK(EFL_CANVAS_POLYGON_CLASS, Efl_Canvas_Polygon_Data,
|
||||
data->engine_data =
|
||||
obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
|
||||
obj->layer->evas->engine.func->polygon_points_clear(ENC,
|
||||
data->engine_data))
|
||||
else CHECK(EVAS_CANVAS3D_TEXTURE_CLASS, Evas_Canvas3D_Texture_Data,
|
||||
if (obj->layer->evas->engine.func->texture_free)
|
||||
obj->layer->evas->engine.func->texture_free(obj->layer->evas->engine.data.output, data->engine_data))
|
||||
obj->layer->evas->engine.func->texture_free(ENC, data->engine_data))
|
||||
else return;
|
||||
#undef CHECK
|
||||
evas_object_ref(obj->object);
|
||||
|
@ -1015,7 +993,14 @@ 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->info) e->engine.info = e->engine.func->info(eo_e);
|
||||
if (e->engine.func->info)
|
||||
{
|
||||
Efl_Canvas_Output *output;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(e->outputs, l, output)
|
||||
output->info = e->engine.func->info(eo_e);
|
||||
}
|
||||
|
||||
// Wayland already handles seats.
|
||||
if (em->definition && (eina_streq(em->definition->name, "wayland_shm") ||
|
||||
|
|
|
@ -205,7 +205,7 @@ _evas_map_free(Evas_Object *eo_obj, Evas_Map *m)
|
|||
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
||||
if ((obj) && (obj->map->spans))
|
||||
{
|
||||
obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->map->spans);
|
||||
obj->layer->evas->engine.func->image_map_clean(ENC, obj->map->spans);
|
||||
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
||||
{
|
||||
free(map_write->spans);
|
||||
|
@ -490,9 +490,7 @@ _map_map_enable_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
{
|
||||
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free
|
||||
(obj->layer->evas->engine.data.output,
|
||||
map_write->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, map_write->surface);
|
||||
map_write->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
||||
|
@ -581,9 +579,7 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
|
|||
{
|
||||
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free
|
||||
(obj->layer->evas->engine.data.output,
|
||||
map_write->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, map_write->surface);
|
||||
map_write->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
||||
|
|
|
@ -1123,8 +1123,8 @@ _evas_canvas_image_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
|||
{
|
||||
evas_canvas_async_block(e);
|
||||
evas_render_rendering_wait(e);
|
||||
if (e->engine.data.output)
|
||||
e->engine.func->image_cache_flush(e->engine.data.output);
|
||||
if (_evas_engine_context(e))
|
||||
e->engine.func->image_cache_flush(_evas_engine_context(e));
|
||||
}
|
||||
|
||||
EOLIAN void
|
||||
|
@ -1178,15 +1178,15 @@ _evas_canvas_image_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size
|
|||
if (size < 0) size = 0;
|
||||
evas_canvas_async_block(e);
|
||||
evas_render_rendering_wait(e);
|
||||
if (e->engine.data.output)
|
||||
e->engine.func->image_cache_set(e->engine.data.output, size);
|
||||
if (_evas_engine_context(e))
|
||||
e->engine.func->image_cache_set(_evas_engine_context(e), size);
|
||||
}
|
||||
|
||||
EOLIAN int
|
||||
_evas_canvas_image_cache_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
||||
{
|
||||
if (e->engine.data.output)
|
||||
return e->engine.func->image_cache_get(e->engine.data.output);
|
||||
if (_evas_engine_context(e))
|
||||
return e->engine.func->image_cache_get(_evas_engine_context(e));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ _evas_canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int *
|
|||
if (maxw) *maxw = 0xffff;
|
||||
if (maxh) *maxh = 0xffff;
|
||||
if (!e->engine.func->image_max_size_get) return EINA_FALSE;
|
||||
e->engine.func->image_max_size_get(e->engine.data.output, &w, &h);
|
||||
e->engine.func->image_max_size_get(_evas_engine_context(e), &w, &h);
|
||||
if (maxw) *maxw = w;
|
||||
if (maxh) *maxh = h;
|
||||
return EINA_TRUE;
|
||||
|
@ -2493,7 +2493,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
|
|||
{
|
||||
Evas_Coord idw, idh, idx, idy;
|
||||
int x, y, w, h;
|
||||
e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
|
||||
e->engine.func->image_dirty_region(ENDT, o->engine_data, rr->x, rr->y, rr->w, rr->h);
|
||||
|
||||
idx = evas_object_image_figure_x_fill(eo_obj, obj, o->cur->fill.x, o->cur->fill.w, &idw);
|
||||
idy = evas_object_image_figure_y_fill(eo_obj, obj, o->cur->fill.y, o->cur->fill.h, &idh);
|
||||
|
@ -2613,7 +2613,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
|
|||
{
|
||||
Eina_Rectangle r;
|
||||
|
||||
e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
|
||||
e->engine.func->image_dirty_region(ENDT, o->engine_data, rr->x, rr->y, rr->w, rr->h);
|
||||
r.x = rr->x;
|
||||
r.y = rr->y;
|
||||
r.w = rr->w;
|
||||
|
@ -2639,7 +2639,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
|
|||
eina_rectangle_free(r);
|
||||
}
|
||||
EINA_COW_PIXEL_WRITE_END(o, pixi_write);
|
||||
e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur->image.w, o->cur->image.h);
|
||||
e->engine.func->image_dirty_region(ENDT, o->engine_data, 0, 0, o->cur->image.w, o->cur->image.h);
|
||||
|
||||
evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj,
|
||||
obj);
|
||||
|
|
|
@ -402,9 +402,7 @@ evas_object_free(Evas_Object *eo_obj, Eina_Bool clean_layer)
|
|||
{
|
||||
if (obj->layer)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free
|
||||
(obj->layer->evas->engine.data.output,
|
||||
obj->map->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, obj->map->surface);
|
||||
}
|
||||
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
||||
map_write->surface = NULL;
|
||||
|
@ -421,8 +419,7 @@ evas_object_free(Evas_Object *eo_obj, Eina_Bool clean_layer)
|
|||
{
|
||||
if (obj->layer)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free
|
||||
(obj->layer->evas->engine.data.output, mask->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, mask->surface);
|
||||
mask->surface = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -533,8 +530,7 @@ evas_object_content_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
|||
EINA_COW_WRITE_BEGIN(evas_object_map_cow,
|
||||
obj->map, Evas_Object_Map_Data, map_write)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free
|
||||
(obj->layer->evas->engine.data.output, map_write->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, map_write->surface);
|
||||
map_write->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
||||
|
@ -699,7 +695,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, in
|
|||
obj->cur->cache.clip.w,
|
||||
obj->cur->cache.clip.h);
|
||||
if ((w > 0) && (h > 0))
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(ENDT,
|
||||
x + e->framespace.x,
|
||||
y + e->framespace.y,
|
||||
w, h);
|
||||
|
@ -714,7 +710,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, in
|
|||
obj->prev->cache.clip.w,
|
||||
obj->prev->cache.clip.h);
|
||||
if ((w > 0) && (h > 0))
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(ENDT,
|
||||
x + e->framespace.x,
|
||||
y + e->framespace.y,
|
||||
w, h);
|
||||
|
@ -737,7 +733,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, in
|
|||
obj->cur->cache.clip.w,
|
||||
obj->cur->cache.clip.h);
|
||||
if ((w > 0) && (h > 0))
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(ENDT,
|
||||
x + e->framespace.x,
|
||||
y + e->framespace.y,
|
||||
w, h);
|
||||
|
@ -749,7 +745,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, in
|
|||
obj->prev->cache.clip.w,
|
||||
obj->prev->cache.clip.h);
|
||||
if ((w > 0) && (h > 0))
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
||||
obj->layer->evas->engine.func->output_redraws_rect_add(ENDT,
|
||||
x + e->framespace.x,
|
||||
y + e->framespace.y,
|
||||
w, h);
|
||||
|
@ -1711,8 +1707,7 @@ _hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
|||
mask->w = mask->h = 0;
|
||||
if (mask->surface)
|
||||
{
|
||||
obj->layer->evas->engine.func->image_free
|
||||
(obj->layer->evas->engine.data.output, mask->surface);
|
||||
obj->layer->evas->engine.func->image_free(ENC, mask->surface);
|
||||
mask->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_mask_cow, obj->mask, mask);
|
||||
|
|
|
@ -262,8 +262,7 @@ evas_object_polygon_free(Evas_Object *eo_obj EINA_UNUSED,
|
|||
{
|
||||
free(list_data);
|
||||
}
|
||||
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
|
||||
o->engine_data);
|
||||
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(ENC, o->engine_data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -289,13 +288,12 @@ evas_object_polygon_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
obj->cur->render_op);
|
||||
if (o->changed)
|
||||
{
|
||||
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
|
||||
o->engine_data);
|
||||
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(ENC, o->engine_data);
|
||||
EINA_LIST_FOREACH(o->points, l, p)
|
||||
{
|
||||
//px = evas_coord_world_x_to_screen(obj->layer->evas, p->x);
|
||||
//py = evas_coord_world_y_to_screen(obj->layer->evas, p->y);
|
||||
o->engine_data = obj->layer->evas->engine.func->polygon_point_add(obj->layer->evas->engine.data.output,
|
||||
o->engine_data = obj->layer->evas->engine.func->polygon_point_add(ENC,
|
||||
o->engine_data,
|
||||
p->x, p->y);
|
||||
}
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#endif
|
||||
|
||||
/* save typing */
|
||||
#define ENFN obj->layer->evas->engine.func
|
||||
#define ENDT obj->layer->evas->engine.data.output
|
||||
#define COL_OBJECT(obj, sub) ARGB_JOIN(obj->sub->color.a, obj->sub->color.r, obj->sub->color.g, obj->sub->color.b)
|
||||
#define COL_JOIN(o, sub, color) ARGB_JOIN(o->sub.color.a, o->sub.color.r, o->sub.color.g, o->sub.color.b)
|
||||
|
||||
|
|
|
@ -81,10 +81,6 @@
|
|||
#include "evas_filter.h"
|
||||
#include "efl_canvas_filter_internal.eo.h"
|
||||
|
||||
/* save typing */
|
||||
#define ENFN obj->layer->evas->engine.func
|
||||
#define ENDT obj->layer->evas->engine.data.output
|
||||
|
||||
/* private magic number for textblock objects */
|
||||
static const char o_type[] = "textblock";
|
||||
|
||||
|
@ -974,7 +970,7 @@ _image_safe_unref(Evas_Public_Data *e, void *image, Eina_Bool async)
|
|||
if (async)
|
||||
evas_unref_queue_image_put(e, image);
|
||||
else
|
||||
e->engine.func->image_free(e->engine.data.output, image);
|
||||
e->engine.func->image_free(_evas_engine_context(e), image);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
|
||||
#define MY_CLASS_NAME "Evas_Textgrid"
|
||||
|
||||
/* save typing */
|
||||
#define ENFN obj->layer->evas->engine.func
|
||||
#define ENDT obj->layer->evas->engine.data.output
|
||||
|
||||
/* private magic number for text objects */
|
||||
static const char o_type[] = "textgrid";
|
||||
|
||||
|
@ -1021,17 +1017,17 @@ _alternate_font_weight_slant(Evas_Object_Protected_Data *obj,
|
|||
int advance, vadvance, ascent;
|
||||
|
||||
script = evas_common_language_script_type_get(W, 1);
|
||||
ENFN->font_run_end_get(ENDT, font, &script_fi, &cur_fi,
|
||||
ENFN->font_run_end_get(ENC, font, &script_fi, &cur_fi,
|
||||
script, W, 1);
|
||||
memset(&text_props, 0, sizeof(Evas_Text_Props));
|
||||
evas_common_text_props_script_set(&text_props, script);
|
||||
ENFN->font_text_props_info_create(ENDT, script_fi, W, &text_props,
|
||||
ENFN->font_text_props_info_create(ENC, script_fi, W, &text_props,
|
||||
NULL, 0, 1,
|
||||
EVAS_TEXT_PROPS_MODE_NONE,
|
||||
fdesc->lang);
|
||||
advance = ENFN->font_h_advance_get(ENDT, font, &text_props);
|
||||
vadvance = ENFN->font_v_advance_get(ENDT, font, &text_props);
|
||||
ascent = ENFN->font_ascent_get(ENDT, font);
|
||||
advance = ENFN->font_h_advance_get(ENC, font, &text_props);
|
||||
vadvance = ENFN->font_v_advance_get(ENC, font, &text_props);
|
||||
ascent = ENFN->font_ascent_get(ENC, font);
|
||||
DBG("on font '%s', with alternate weight/slant %s, "
|
||||
"width: %d vs %d, height: %d vs %d, ascent: %d vs %d",
|
||||
fdesc->name, kind,
|
||||
|
@ -1127,19 +1123,19 @@ _evas_textgrid_efl_text_properties_font_set(Eo *eo_obj,
|
|||
int advance, vadvance;
|
||||
|
||||
script = evas_common_language_script_type_get(W, 1);
|
||||
ENFN->font_run_end_get(ENDT, o->font_normal, &script_fi, &cur_fi,
|
||||
ENFN->font_run_end_get(ENC, o->font_normal, &script_fi, &cur_fi,
|
||||
script, W, 1);
|
||||
memset(&text_props, 0, sizeof(Evas_Text_Props));
|
||||
evas_common_text_props_script_set(&text_props, script);
|
||||
ENFN->font_text_props_info_create(ENDT, script_fi, W, &text_props,
|
||||
ENFN->font_text_props_info_create(ENC, script_fi, W, &text_props,
|
||||
NULL, 0, 1,
|
||||
EVAS_TEXT_PROPS_MODE_NONE,
|
||||
fdesc->lang);
|
||||
advance = ENFN->font_h_advance_get(ENDT, o->font_normal, &text_props);
|
||||
vadvance = ENFN->font_v_advance_get(ENDT, o->font_normal, &text_props);
|
||||
advance = ENFN->font_h_advance_get(ENC, o->font_normal, &text_props);
|
||||
vadvance = ENFN->font_v_advance_get(ENC, o->font_normal, &text_props);
|
||||
o->cur.char_width = advance;
|
||||
o->cur.char_height = vadvance;
|
||||
o->ascent = ENFN->font_ascent_get(ENDT, o->font_normal);
|
||||
o->ascent = ENFN->font_ascent_get(ENC, o->font_normal);
|
||||
evas_common_text_props_content_unref(&text_props);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -181,7 +181,7 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
int x, int y, Eina_Bool do_async)
|
||||
{
|
||||
Evas_VG_Data *vd = type_private_data;
|
||||
Ector_Surface *ector = evas_ector_get(obj->layer->evas);
|
||||
Ector_Surface *ector = evas_ector_get(obj->layer->evas, output);
|
||||
// FIXME: Set context (that should affect Ector_Surface) and
|
||||
// then call Ector_Renderer render from bottom to top. Get the
|
||||
// Ector_Surface that match the output from Evas engine API.
|
||||
|
@ -251,7 +251,7 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
|
|||
}
|
||||
|
||||
// FIXME: handle damage only on changed renderer.
|
||||
s = evas_ector_get(obj->layer->evas);
|
||||
s = evas_ector_get(obj->layer->evas, _evas_default_output_get(obj->layer->evas));
|
||||
if (vd->root && s)
|
||||
_evas_vg_render_pre(vd->root, s, NULL);
|
||||
|
||||
|
|
|
@ -96,8 +96,12 @@ rend_dbg(const char *txt)
|
|||
#define OBJS_ARRAY_FLUSH(array) eina_array_flush(array)
|
||||
|
||||
/* save typing */
|
||||
#undef ENFN
|
||||
#undef ENDT
|
||||
#undef ENC
|
||||
#define ENFN evas->engine.func
|
||||
#define ENDT evas->engine.data.output
|
||||
#define ENDT _evas_default_output_get(evas)
|
||||
#define ENC _evas_engine_context(evas)
|
||||
|
||||
typedef struct _Render_Updates Render_Updates;
|
||||
typedef struct _Cutout_Margin Cutout_Margin;
|
||||
|
@ -1876,7 +1880,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
|
|||
RD(level, " new surf: %ix%i\n", sw, sh);
|
||||
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
||||
{
|
||||
ENFN->image_free(ENDT, map_write->surface);
|
||||
ENFN->image_free(ENC, map_write->surface);
|
||||
map_write->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
||||
|
@ -1890,7 +1894,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
|
|||
map_write->surface_h = sh;
|
||||
|
||||
map_write->surface = ENFN->image_map_surface_new
|
||||
(ENDT, map_write->surface_w,
|
||||
(ENC, map_write->surface_w,
|
||||
map_write->surface_h,
|
||||
map_write->cur.map->alpha);
|
||||
}
|
||||
|
@ -2328,7 +2332,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
|||
((proxy_write->w != w) || (proxy_write->h != h)))
|
||||
{
|
||||
RD(level, " free surface: %p\n", proxy_write->surface);
|
||||
ENFN->image_free(ENDT, proxy_write->surface);
|
||||
ENFN->image_free(ENC, proxy_write->surface);
|
||||
proxy_write->surface = NULL;
|
||||
}
|
||||
|
||||
|
@ -2337,7 +2341,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
|||
if (!proxy_write->surface)
|
||||
{
|
||||
if ((w < 1) || (h < 1)) goto end;
|
||||
proxy_write->surface = ENFN->image_map_surface_new(ENDT, w, h, 1);
|
||||
proxy_write->surface = ENFN->image_map_surface_new(ENC, w, h, 1);
|
||||
RD(level, " created surface: %p %dx%d\n", proxy_write->surface, w, h);
|
||||
if (!proxy_write->surface) goto end;
|
||||
proxy_write->w = w;
|
||||
|
@ -2509,7 +2513,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
|
|||
* (we don't know how to render objects to alpha) */
|
||||
if (mdata->surface && ((w != mdata->w) || (h != mdata->h) || mdata->is_alpha || mdata->is_scaled))
|
||||
{
|
||||
ENFN->image_free(ENDT, mdata->surface);
|
||||
ENFN->image_free(ENC, mdata->surface);
|
||||
mdata->surface = NULL;
|
||||
}
|
||||
|
||||
|
@ -2517,7 +2521,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
|
|||
if (!mdata->surface)
|
||||
{
|
||||
eina_evlog("+mask_surface_new", mask->object, 0.0, NULL);
|
||||
mdata->surface = ENFN->image_map_surface_new(ENDT, w, h, EINA_TRUE);
|
||||
mdata->surface = ENFN->image_map_surface_new(ENC, w, h, EINA_TRUE);
|
||||
eina_evlog("-mask_surface_new", mask->object, 0.0, NULL);
|
||||
if (!mdata->surface) goto end;
|
||||
mdata->is_alpha = EINA_FALSE;
|
||||
|
@ -2582,7 +2586,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
|
|||
|
||||
eina_evlog("+mask_new_cpy_data", mask->object, 0.0, NULL);
|
||||
alpha_surface = ENFN->image_new_from_copied_data
|
||||
(ENDT, w, h, NULL, EINA_TRUE, EVAS_COLORSPACE_GRY8);
|
||||
(ENC, w, h, NULL, EINA_TRUE, EVAS_COLORSPACE_GRY8);
|
||||
eina_evlog("-mask_new_cpy_data", mask->object, 0.0, NULL);
|
||||
if (!alpha_surface) goto end;
|
||||
|
||||
|
@ -2596,7 +2600,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
|
|||
eina_evlog("-mask_cpy_data", mask->object, 0.0, NULL);
|
||||
|
||||
/* Now we can drop the original surface */
|
||||
ENFN->image_free(ENDT, mdata->surface);
|
||||
ENFN->image_free(ENC, mdata->surface);
|
||||
mdata->surface = alpha_surface;
|
||||
mdata->is_alpha = EINA_TRUE;
|
||||
}
|
||||
|
@ -3828,8 +3832,14 @@ _evas_canvas_render_idle_flush(Eo *eo_e, Evas_Public_Data *evas)
|
|||
|
||||
evas_fonts_zero_pressure(eo_e);
|
||||
|
||||
if (ENFN && ENFN->output_idle_flush && ENDT)
|
||||
ENFN->output_idle_flush(ENDT);
|
||||
if (ENFN && ENFN->output_idle_flush)
|
||||
{
|
||||
Efl_Canvas_Output *output;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(evas->outputs, l, output)
|
||||
ENFN->output_idle_flush(output->output);
|
||||
}
|
||||
|
||||
eina_inarray_flush(&evas->active_objects);
|
||||
OBJS_ARRAY_FLUSH(&evas->render_objects);
|
||||
|
@ -3865,7 +3875,7 @@ _evas_render_dump_map_surfaces(Evas_Object *eo_obj)
|
|||
if ((obj->map->cur.map) && obj->map->surface)
|
||||
{
|
||||
Evas_Public_Data *evas = obj->layer->evas;
|
||||
ENFN->image_free(ENDT, obj->map->surface);
|
||||
ENFN->image_free(ENC, obj->map->surface);
|
||||
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
||||
map_write->surface = NULL;
|
||||
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
||||
|
@ -3904,7 +3914,7 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *evas)
|
|||
{
|
||||
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy, Evas_Object_Proxy_Data, proxy_write)
|
||||
{
|
||||
ENFN->image_free(ENDT, proxy_write->surface);
|
||||
ENFN->image_free(ENC, proxy_write->surface);
|
||||
proxy_write->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_proxy_cow, obj->proxy, proxy_write);
|
||||
|
@ -3913,7 +3923,7 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *evas)
|
|||
{
|
||||
EINA_COW_WRITE_BEGIN(evas_object_mask_cow, obj->mask, Evas_Object_Mask_Data, mdata)
|
||||
{
|
||||
ENFN->image_free(ENDT, mdata->surface);
|
||||
ENFN->image_free(ENC, mdata->surface);
|
||||
mdata->surface = NULL;
|
||||
}
|
||||
EINA_COW_WRITE_END(evas_object_mask_cow, obj->mask, mdata);
|
||||
|
@ -3925,8 +3935,14 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *evas)
|
|||
lay->walking_objects--;
|
||||
_evas_layer_flush_removes(lay);
|
||||
}
|
||||
if (ENFN && ENFN->output_dump && ENDT)
|
||||
ENFN->output_dump(ENDT);
|
||||
if (ENFN && ENFN->output_dump)
|
||||
{
|
||||
Efl_Canvas_Output *output;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(evas->outputs, l, output)
|
||||
ENFN->output_dump(output);
|
||||
}
|
||||
|
||||
#define GC_ALL(Cow) \
|
||||
if (Cow) while (eina_cow_gc(Cow))
|
||||
|
@ -3938,8 +3954,14 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *evas)
|
|||
|
||||
evas_fonts_zero_pressure(eo_e);
|
||||
|
||||
if (ENFN && ENFN->output_idle_flush && ENDT)
|
||||
ENFN->output_idle_flush(ENDT);
|
||||
if (ENFN && ENFN->output_idle_flush)
|
||||
{
|
||||
Efl_Canvas_Output *output;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(evas->outputs, l, output)
|
||||
ENFN->output_idle_flush(output);
|
||||
}
|
||||
|
||||
eina_inarray_flush(&evas->active_objects);
|
||||
OBJS_ARRAY_FLUSH(&evas->render_objects);
|
||||
|
|
|
@ -89,8 +89,8 @@ evas_filter_context_clear(Evas_Filter_Context *ctx, Eina_Bool keep_buffers)
|
|||
|
||||
if (!ctx) return;
|
||||
|
||||
if (ctx->target.surface) ENFN->image_free(ENDT, ctx->target.surface);
|
||||
if (ctx->target.mask) ENFN->image_free(ENDT, ctx->target.mask);
|
||||
if (ctx->target.surface) ENFN->image_free(ENC, ctx->target.surface);
|
||||
if (ctx->target.mask) ENFN->image_free(ENC, ctx->target.mask);
|
||||
ctx->target.surface = NULL;
|
||||
ctx->target.mask = NULL;
|
||||
|
||||
|
@ -163,7 +163,7 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context *ctx, Eo *eo_obj,
|
|||
}
|
||||
}
|
||||
XDBG("Source #%d '%s' has dimensions %dx%d", fb->id, fb->source_name, fb->w, fb->h);
|
||||
if (!fb->buffer) fb->buffer = ENFN->ector_buffer_wrap(ENDT, obj->layer->evas->evas, source->proxy->surface);
|
||||
if (!fb->buffer) fb->buffer = ENFN->ector_buffer_wrap(ENC, obj->layer->evas->evas, source->proxy->surface);
|
||||
fb->alpha_only = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ _ector_buffer_create(Evas_Filter_Buffer const *fb, Eina_Bool render, Eina_Bool d
|
|||
if (draw) flags |= ECTOR_BUFFER_FLAG_DRAWABLE;
|
||||
if (fb->alpha_only) cspace = EFL_GFX_COLORSPACE_GRY8;
|
||||
|
||||
return fb->ENFN->ector_buffer_new(fb->ENDT, fb->ctx->evas->evas,
|
||||
return fb->ENFN->ector_buffer_new(FB_ENC, fb->ctx->evas->evas,
|
||||
fb->w, fb->h, cspace, flags);
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ evas_filter_buffer_backing_set(Evas_Filter_Context *ctx, int bufid,
|
|||
|
||||
if (fb->is_render) goto end;
|
||||
|
||||
buffer = ENFN->ector_buffer_wrap(ENDT, ctx->evas->evas, engine_buffer);
|
||||
buffer = ENFN->ector_buffer_wrap(ENC, ctx->evas->evas, engine_buffer);
|
||||
ret = EINA_TRUE;
|
||||
|
||||
end:
|
||||
|
@ -860,7 +860,7 @@ _blur_support_gl(Evas_Filter_Context *ctx, Evas_Filter_Buffer *in, Evas_Filter_B
|
|||
cmd.blur.type = EVAS_FILTER_BLUR_GAUSSIAN;
|
||||
cmd.blur.dx = 5;
|
||||
|
||||
return cmd.ENFN->gfx_filter_supports(cmd.ENDT, &cmd) == EVAS_FILTER_SUPPORT_GL;
|
||||
return cmd.ENFN->gfx_filter_supports(_evas_engine_context(cmd.ctx->evas), &cmd) == EVAS_FILTER_SUPPORT_GL;
|
||||
}
|
||||
|
||||
Evas_Filter_Command *
|
||||
|
@ -1542,7 +1542,7 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void *draw_context,
|
|||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE);
|
||||
|
||||
ctx->target.surface = ENFN->image_ref(ENDT, surface);
|
||||
ctx->target.surface = ENFN->image_ref(ENC, surface);
|
||||
ctx->target.x = x;
|
||||
ctx->target.y = y;
|
||||
ctx->target.clip_use = ENFN->context_clip_get
|
||||
|
@ -1568,7 +1568,7 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void *draw_context,
|
|||
ENFN->context_clip_image_get
|
||||
(ENDT, draw_context, &mask, &ctx->target.mask_x, &ctx->target.mask_y);
|
||||
if (ctx->target.mask)
|
||||
ctx->evas->engine.func->image_free(ctx->evas->engine.data.output, ctx->target.mask);
|
||||
ctx->evas->engine.func->image_free(_evas_engine_context(ctx->evas), ctx->target.mask);
|
||||
ctx->target.mask = mask; // FIXME: why no ref???
|
||||
|
||||
return EINA_TRUE;
|
||||
|
@ -1630,13 +1630,13 @@ _filter_target_render(Evas_Filter_Context *ctx)
|
|||
ENFN->context_free(ENDT, drawctx);
|
||||
evas_ector_buffer_engine_image_release(src->buffer, image);
|
||||
|
||||
ENFN->image_free(ENDT, surface);
|
||||
ENFN->image_free(ENC, surface);
|
||||
ctx->target.surface = NULL;
|
||||
|
||||
return EINA_TRUE;
|
||||
|
||||
fail:
|
||||
ENFN->image_free(ENDT, surface);
|
||||
ENFN->image_free(ENC, surface);
|
||||
ctx->target.surface = NULL;
|
||||
|
||||
ERR("Failed to render filter to target canvas!");
|
||||
|
@ -1661,7 +1661,7 @@ evas_filter_font_draw(Evas_Filter_Context *ctx, void *draw_context, int bufid,
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
|
||||
|
||||
// Copied from evas_font_draw_async_check
|
||||
async_unref = ENFN->font_draw(ENDT, draw_context, surface,
|
||||
async_unref = ENFN->font_draw(ENC, draw_context, surface,
|
||||
font, x, y, fb->w, fb->h, fb->w, fb->h,
|
||||
text_props, do_async);
|
||||
if (do_async && async_unref)
|
||||
|
@ -1782,14 +1782,14 @@ _filter_command_run(Evas_Filter_Command *cmd)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
support = cmd->ENFN->gfx_filter_supports(cmd->ENDT, cmd);
|
||||
support = cmd->ENFN->gfx_filter_supports(CMD_ENC, cmd);
|
||||
if (support == EVAS_FILTER_SUPPORT_NONE)
|
||||
{
|
||||
ERR("No function to process this filter (mode %d)", cmd->mode);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
return cmd->ENFN->gfx_filter_process(cmd->ENDT, cmd);
|
||||
return cmd->ENFN->gfx_filter_process(CMD_ENC, cmd);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
|
|
@ -75,8 +75,16 @@ extern int _evas_filter_log_dom;
|
|||
#endif
|
||||
|
||||
// Helpers
|
||||
#undef ENFN
|
||||
#undef ENDT
|
||||
#undef ENC
|
||||
#define ENFN ctx->evas->engine.func
|
||||
#define ENDT ctx->evas->engine.data.output
|
||||
#define ENDT _evas_default_output_get(ctx->evas)
|
||||
#define ENC _evas_engine_context(ctx->evas)
|
||||
|
||||
#define CMD_ENDT _evas_default_output_get(cmd->ctx->evas)
|
||||
#define CMD_ENC _evas_engine_context(cmd->ctx->evas)
|
||||
#define FB_ENC _evas_engine_context(fb->ctx->evas)
|
||||
|
||||
#define BUFFERS_LOCK() do { if (cmd->input) cmd->input->locked = 1; if (cmd->output) cmd->output->locked = 1; if (cmd->mask) cmd->mask->locked = 1; } while (0)
|
||||
#define BUFFERS_UNLOCK() do { if (cmd->input) cmd->input->locked = 0; if (cmd->output) cmd->output->locked = 0; if (cmd->mask) cmd->mask->locked = 0; } while (0)
|
||||
|
|
|
@ -339,6 +339,28 @@ _evas_eina_rectangle_inside(const Eina_Rectangle *big, const Eina_Rectangle *sma
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
// Temporary until we have multi output support
|
||||
static inline void *
|
||||
_evas_default_output_get(Evas_Public_Data *e)
|
||||
{
|
||||
Efl_Canvas_Output *output;
|
||||
|
||||
output = eina_list_data_get(e->outputs);
|
||||
return output->output;
|
||||
}
|
||||
|
||||
static inline void *
|
||||
_evas_engine_context(Evas_Public_Data *e)
|
||||
{
|
||||
// Need to split between engine context
|
||||
// and output context, use one for now.
|
||||
Efl_Canvas_Output *output;
|
||||
|
||||
if (!e->outputs) return NULL;
|
||||
output = eina_list_data_get(e->outputs);
|
||||
return output->output;
|
||||
}
|
||||
|
||||
#define _EVAS_COLOR_CLAMP(x, y) do { \
|
||||
if (x > y) { x = y; bad = 1; } \
|
||||
if (x < 0) { x = 0; bad = 1; } } while (0)
|
||||
|
|
|
@ -46,6 +46,11 @@
|
|||
# endif
|
||||
#endif /* ! _WIN32 */
|
||||
|
||||
/* save typing */
|
||||
#define ENFN obj->layer->evas->engine.func
|
||||
#define ENDT _evas_default_output_get(obj->layer->evas)
|
||||
#define ENC _evas_engine_context(obj->layer->evas)
|
||||
|
||||
#include "canvas/evas_text.eo.h"
|
||||
#include "canvas/evas_textgrid.eo.h"
|
||||
#include "canvas/evas_line.eo.h"
|
||||
|
@ -873,13 +878,6 @@ struct _Evas_Public_Data
|
|||
struct {
|
||||
Evas_Module *module;
|
||||
Evas_Func *func;
|
||||
Ector_Surface *ector;
|
||||
struct {
|
||||
void *output;
|
||||
} data;
|
||||
|
||||
void *info;
|
||||
int info_magic;
|
||||
} engine;
|
||||
|
||||
struct {
|
||||
|
@ -1291,8 +1289,12 @@ struct _Efl_Canvas_Output
|
|||
{
|
||||
Eo *canvas;
|
||||
|
||||
Ector_Surface *ector;
|
||||
|
||||
void *info, *output;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
int info_magic;
|
||||
};
|
||||
|
||||
struct _Evas_Object_Func
|
||||
|
@ -1558,7 +1560,7 @@ struct _Evas_Func
|
|||
void (*texture_image_set) (void *data, void *texture, void *image);
|
||||
void *(*texture_image_get) (void *data, void *texture);
|
||||
|
||||
Ector_Surface *(*ector_create) (void *data);
|
||||
Ector_Surface *(*ector_create) (void *engine, void *output);
|
||||
void (*ector_destroy) (void *data, Ector_Surface *surface);
|
||||
Ector_Buffer *(*ector_buffer_wrap) (void *data, Evas *e, void *engine_image);
|
||||
Ector_Buffer *(*ector_buffer_new) (void *data, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags);
|
||||
|
@ -1890,7 +1892,7 @@ void evas_filter_init(void);
|
|||
void evas_filter_shutdown(void);
|
||||
|
||||
/* Ector */
|
||||
Ector_Surface *evas_ector_get(Evas_Public_Data *evas);
|
||||
Ector_Surface *evas_ector_get(Evas_Public_Data *evas, void *output);
|
||||
|
||||
/* Temporary save/load functions */
|
||||
void evas_common_load_model_from_file(Evas_Canvas3D_Mesh *model, const char *file);
|
||||
|
|
|
@ -45,8 +45,12 @@ struct _Evas_Ector_GL_Buffer_Data
|
|||
Ector_GL_Buffer_Map *maps;
|
||||
};
|
||||
|
||||
#undef ENFN
|
||||
#undef ENDT
|
||||
#undef ENC
|
||||
|
||||
#define ENFN pd->evas->engine.func
|
||||
#define ENDT pd->evas->engine.data.output
|
||||
#define ENC _evas_engine_context(pd->evas)
|
||||
|
||||
// testing out some macros to maybe add to eina
|
||||
#define EINA_INLIST_REMOVE(l,i) do { l = (__typeof__(l)) eina_inlist_remove(EINA_INLIST_GET(l), EINA_INLIST_GET(i)); } while (0)
|
||||
|
@ -119,8 +123,9 @@ _evas_ector_gl_buffer_gl_buffer_prepare(Eo *obj, Evas_Ector_GL_Buffer_Data *pd,
|
|||
else
|
||||
fail("Unsupported colorspace: %u", cspace);
|
||||
|
||||
// FIXME: we should not rely on evas canvas in the module (just evas engine)
|
||||
pd->evas = efl_data_xref(eo_evas, EVAS_CANVAS_CLASS, obj);
|
||||
re = pd->evas->engine.data.output;
|
||||
re = ENC;
|
||||
gc = re->window_gl_context_get(re->software.ob);
|
||||
|
||||
im = evas_gl_common_image_surface_new(gc, w, h, EINA_TRUE, EINA_FALSE);
|
||||
|
@ -238,12 +243,12 @@ _evas_ector_gl_buffer_ector_buffer_map(Eo *obj EINA_UNUSED, Evas_Ector_GL_Buffer
|
|||
if (write && _evas_gl_image_is_fbo(pd->glim))
|
||||
{
|
||||
// Can not open FBO data to write!
|
||||
im = ENFN->image_data_get(ENDT, pd->glim, EINA_FALSE, &data, &err, &tofree);
|
||||
im = ENFN->image_data_get(ENC, pd->glim, EINA_FALSE, &data, &err, &tofree);
|
||||
if (!im) return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
im = ENFN->image_data_get(ENDT, pd->glim, write, &data, &err, &tofree);
|
||||
im = ENFN->image_data_get(ENC, pd->glim, write, &data, &err, &tofree);
|
||||
if (!im) return NULL;
|
||||
}
|
||||
|
||||
|
@ -333,12 +338,12 @@ _evas_ector_gl_buffer_ector_buffer_unmap(Eo *obj EINA_UNUSED, Evas_Ector_GL_Buff
|
|||
if (map->im)
|
||||
{
|
||||
MAP_DUMP(map->im, "out_ro_free");
|
||||
ENFN->image_free(ENDT, map->im);
|
||||
ENFN->image_free(ENC, map->im);
|
||||
}
|
||||
else
|
||||
{
|
||||
MAP_DUMP(pd->glim, "out_ro_nofree");
|
||||
ENFN->image_data_put(ENDT, pd->glim, map->image_data);
|
||||
ENFN->image_data_put(ENC, pd->glim, map->image_data);
|
||||
}
|
||||
}
|
||||
if (map->allocated)
|
||||
|
|
|
@ -43,8 +43,13 @@ struct _Evas_Ector_GL_Image_Buffer_Data
|
|||
Ector_GL_Buffer_Map *maps;
|
||||
};
|
||||
|
||||
#undef ENFN
|
||||
#undef ENDT
|
||||
#undef ENC
|
||||
|
||||
// FIXME: It should not use evas canvas, just the engine
|
||||
#define ENFN pd->evas->engine.func
|
||||
#define ENDT pd->evas->engine.data.output
|
||||
#define ENC _evas_engine_context(pd->evas)
|
||||
|
||||
// testing out some macros to maybe add to eina
|
||||
#define EINA_INLIST_REMOVE(l,i) do { l = (__typeof__(l)) eina_inlist_remove(EINA_INLIST_GET(l), EINA_INLIST_GET(i)); } while (0)
|
||||
|
@ -77,7 +82,7 @@ _evas_ector_gl_image_buffer_evas_ector_buffer_engine_image_set(Eo *obj, Evas_Ect
|
|||
evas = efl_data_xref(eo_evas, EVAS_CANVAS_CLASS, obj);
|
||||
if (!im->tex)
|
||||
{
|
||||
Render_Engine_GL_Generic *re = pd->evas->engine.data.output;
|
||||
Render_Engine_GL_Generic *re = ENC;
|
||||
Evas_Engine_GL_Context *gc;
|
||||
|
||||
gc = re->window_gl_context_get(re->software.ob);
|
||||
|
@ -183,7 +188,7 @@ _evas_ector_gl_image_buffer_ector_buffer_map(Eo *obj EINA_UNUSED, Evas_Ector_GL_
|
|||
if (!h) h = H - y;
|
||||
if ((x + w > W) || (y + h > H)) return NULL;
|
||||
|
||||
im = ENFN->image_data_get(ENDT, pd->glim, EINA_FALSE, &data, &err, &tofree);
|
||||
im = ENFN->image_data_get(ENC, pd->glim, EINA_FALSE, &data, &err, &tofree);
|
||||
if (!im) return NULL;
|
||||
|
||||
map = calloc(1, sizeof(*map));
|
||||
|
@ -247,9 +252,9 @@ _evas_ector_gl_image_buffer_ector_buffer_unmap(Eo *obj EINA_UNUSED,
|
|||
{
|
||||
EINA_INLIST_REMOVE(pd->maps, map);
|
||||
if (map->free_image)
|
||||
ENFN->image_free(ENDT, map->im);
|
||||
ENFN->image_free(ENC, map->im);
|
||||
else
|
||||
ENFN->image_data_put(ENDT, map->im, map->image_data);
|
||||
ENFN->image_data_put(ENC, map->im, map->image_data);
|
||||
if (map->allocated)
|
||||
free(map->base_data);
|
||||
free(map);
|
||||
|
|
|
@ -2434,7 +2434,7 @@ static Eina_Bool use_cairo = EINA_FALSE;
|
|||
static Eina_Bool use_gl = EINA_FALSE;
|
||||
|
||||
static Ector_Surface *
|
||||
eng_ector_create(void *data EINA_UNUSED)
|
||||
eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED)
|
||||
{
|
||||
Ector_Surface *ector;
|
||||
const char *ector_backend;
|
||||
|
|
|
@ -4306,7 +4306,7 @@ eng_output_idle_flush(void *data)
|
|||
static Eina_Bool use_cairo;
|
||||
|
||||
static Ector_Surface *
|
||||
eng_ector_create(void *data EINA_UNUSED)
|
||||
eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED)
|
||||
{
|
||||
Ector_Surface *ector;
|
||||
const char *ector_backend;
|
||||
|
|
|
@ -222,7 +222,7 @@ _filter_blend_cpu_generic_do(Evas_Filter_Command *cmd, draw_func image_draw)
|
|||
dc.rop = cmd->draw.rop;
|
||||
dc.color = ARGB_JOIN(cmd->draw.A, cmd->draw.R, cmd->draw.G, cmd->draw.B);
|
||||
|
||||
ret = _mapped_blend(cmd->ENDT, &dc, src, src_stride, dst, dst_stride, cmd->draw.fillmode,
|
||||
ret = _mapped_blend(CMD_ENDT, &dc, src, src_stride, dst, dst_stride, cmd->draw.fillmode,
|
||||
sx, sy, sw, sh, dx, dy, dw, dh, image_draw);
|
||||
|
||||
end:
|
||||
|
|
Loading…
Reference in New Issue