diff --git a/src/lib/evas/canvas/efl_canvas_filter_internal.eo b/src/lib/evas/canvas/efl_canvas_filter_internal.eo index a60b3f1594..f8a21baaf6 100644 --- a/src/lib/evas/canvas/efl_canvas_filter_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_filter_internal.eo @@ -83,8 +83,10 @@ mixin Efl.Canvas.Filter.Internal (Efl.Gfx.Filter, Efl.Object) return: bool; [[Indicates success from the object render function.]] params { filter: void_ptr; [[Current filter context]] + engine: void_ptr; [[Engine context]] + output: void_ptr; [[Output context]] drawctx: void_ptr; [[Draw context (for evas engine)]] - data: void_ptr; [[Arbitrary private data]] + data: void_ptr; [[Private data used by textblock]] l: int; [[Left]] r: int; [[Right]] t: int; [[Top]] diff --git a/src/lib/evas/canvas/efl_canvas_proxy.c b/src/lib/evas/canvas/efl_canvas_proxy.c index c59e47c5d1..3d9aa380b2 100644 --- a/src/lib/evas/canvas/efl_canvas_proxy.c +++ b/src/lib/evas/canvas/efl_canvas_proxy.c @@ -348,7 +348,8 @@ _efl_canvas_proxy_efl_gfx_buffer_buffer_unmap(Eo *eo_obj, void *_pd EINA_UNUSED, * Give them some pixels. A random color */ void -_evas_image_proxy_error(Evas_Object *eo_proxy, void *context, void *output, void *surface, +_evas_image_proxy_error(Evas_Object *eo_proxy, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { Evas_Image_Data *o = efl_data_scope_get(eo_proxy, EFL_CANVAS_IMAGE_INTERNAL_CLASS); @@ -363,10 +364,10 @@ _evas_image_proxy_error(Evas_Object *eo_proxy, void *context, void *output, void proxy = efl_data_scope_get(eo_proxy, EFL_CANVAS_OBJECT_CLASS); func = proxy->layer->evas->engine.func; - func->context_color_set(output, context, 0, 0, 0, 255); - func->context_multiplier_unset(output, context); - func->context_render_op_set(output, context, proxy->cur->render_op); - func->rectangle_draw(output, context, surface, proxy->cur->geometry.x + x, + func->context_color_set(engine, context, 0, 0, 0, 255); + func->context_multiplier_unset(engine, context); + func->context_render_op_set(engine, context, proxy->cur->render_op); + func->rectangle_draw(engine, output, context, surface, proxy->cur->geometry.x + x, proxy->cur->geometry.y + y, proxy->cur->geometry.w, proxy->cur->geometry.h, diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.c b/src/lib/evas/canvas/efl_canvas_scene3d.c index 5e97c8cdb9..8c4ce8f314 100644 --- a/src/lib/evas/canvas/efl_canvas_scene3d.c +++ b/src/lib/evas/canvas/efl_canvas_scene3d.c @@ -31,7 +31,7 @@ _efl_canvas_scene3d_scene3d_get(Eo *eo_obj, void *pd EINA_UNUSED) void _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o EINA_UNUSED, - Evas_Canvas3D_Scene *scene) + Evas_Canvas3D_Scene *scene, void *engine, void *output) { Evas_Public_Data *e; Eina_Bool need_native_set = 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(_evas_engine_context(e), + e->engine.func->drawable_size_get(engine, 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(_evas_engine_context(e), + e->engine.func->drawable_free(engine, pd_scene->surface); } pd_scene->surface = NULL; @@ -76,7 +76,7 @@ _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(_evas_engine_context(e), + e->engine.func->drawable_new(engine, pd_scene->w, pd_scene->h, 1); } need_native_set = EINA_TRUE; @@ -90,7 +90,7 @@ _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(_evas_engine_context(e), + e->engine.func->image_drawable_set(engine, data->surface, pd_scene->surface); } @@ -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(_evas_engine_context(e), + e->engine.func->drawable_scene_render(engine, output, pd_scene->surface, &scene_data); } /* Clean up temporary resources. */ diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c index c1d54b72ec..90e3a995e2 100644 --- a/src/lib/evas/canvas/evas_canvas3d_texture.c +++ b/src/lib/evas/canvas/evas_canvas3d_texture.c @@ -50,7 +50,7 @@ _texture_proxy_unset(Evas_Canvas3D_Texture_Data *texture) } static inline void -_texture_proxy_subrender(Evas_Canvas3D_Texture *obj) +_texture_proxy_subrender(Evas_Canvas3D_Texture *obj, void *engine) { /* Code taken from _proxy_subrender() in file evas_object_image.c */ Eo *evas = 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(_evas_engine_context(e), image, &w, &h); + e->engine.func->image_size_get(engine, 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(_evas_engine_context(e), proxy_write->surface); + e->engine.func->image_free(engine, 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 - (_evas_engine_context(e), w, h, 1); + (engine, w, h, 1); if (!proxy_write->surface) goto end; proxy_write->w = w; proxy_write->h = h; } - 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, + ctx = e->engine.func->context_new(engine); + e->engine.func->context_color_set(engine, ctx, 0, 0, 0, 0); - e->engine.func->context_render_op_set(_evas_default_output_get(e), ctx, + e->engine.func->context_render_op_set(engine, ctx, EVAS_RENDER_COPY); - e->engine.func->rectangle_draw(_evas_default_output_get(e), ctx, + e->engine.func->rectangle_draw(engine, _evas_default_output_get(e), ctx, proxy_write->surface, 0, 0, w, h, EINA_FALSE); - e->engine.func->context_free(_evas_default_output_get(e), ctx); + e->engine.func->context_free(engine, ctx); - ctx = e->engine.func->context_new(_evas_default_output_get(e)); + ctx = e->engine.func->context_new(engine); 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(_evas_engine_context(e), image, + e->engine.func->image_size_get(engine, image, &imagew, &imageh); - e->engine.func->image_draw(_evas_default_output_get(e), ctx, + e->engine.func->image_draw(engine, _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(_evas_default_output_get(e), ctx); + e->engine.func->context_free(engine, ctx); proxy_write->surface = e->engine.func->image_dirty_region - (_evas_default_output_get(e), proxy_write->surface, 0, 0, w, h); + (engine, proxy_write->surface, 0, 0, w, h); } end: EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write); @@ -256,7 +256,7 @@ _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D } pd->proxy_rendering = EINA_TRUE; - _texture_proxy_subrender(obj); + _texture_proxy_subrender(obj, _evas_engine_context(e)); if (e->engine.func->texture_image_set) e->engine.func->texture_image_set(_evas_engine_context(e), diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c index 4d837d3fa2..ab9a8191d0 100644 --- a/src/lib/evas/canvas/evas_filter_mixin.c +++ b/src/lib/evas/canvas/evas_filter_mixin.c @@ -241,7 +241,7 @@ _evas_filter_obscured_region_changed(Evas_Filter_Data *pd) Eina_Bool evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async, Eina_Bool alpha) { Evas_Filter_Data *pd = efl_data_scope_get(eo_obj, MY_CLASS); @@ -263,26 +263,26 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, Y = obj->cur->geometry.y; // Prepare color multiplier - ENFN->context_color_set(output, context, + ENFN->context_color_set(engine, context, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); if (obj->cur->clipper) - ENFN->context_multiplier_set(output, context, + ENFN->context_multiplier_set(engine, context, obj->cur->clipper->cur->cache.clip.r, obj->cur->clipper->cur->cache.clip.g, obj->cur->clipper->cur->cache.clip.b, obj->cur->clipper->cur->cache.clip.a); else - ENFN->context_multiplier_unset(output, context); + ENFN->context_multiplier_unset(engine, context); if (obj->map->cur.usemap && obj->map->cur.map && (obj->map->cur.map->count >= 4)) { int iw, ih; use_map = EINA_TRUE; - ENFN->image_size_get(ENC, previous, &iw, &ih); + ENFN->image_size_get(engine, previous, &iw, &ih); evas_object_map_update(eo_obj, x, y, iw, ih, iw, ih); } @@ -348,12 +348,12 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, // Render this image only if (use_map) { - ENFN->image_map_draw(ENDT, context, surface, previous, + ENFN->image_map_draw(engine, output, context, surface, previous, obj->map->spans, EINA_TRUE, 0, do_async); } else { - ENFN->image_draw(ENDT, context, + ENFN->image_draw(engine, output, context, surface, previous, 0, 0, W, H, // src X + x, Y + y, W, H, // dst @@ -415,8 +415,8 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, evas_filter_context_proxy_render_all(filter, eo_obj, EINA_FALSE); // Draw Context - drawctx = ENFN->context_new(ENDT); - ENFN->context_color_set(ENDT, drawctx, 255, 255, 255, 255); + drawctx = ENFN->context_new(engine); + ENFN->context_color_set(engine, drawctx, 255, 255, 255, 255); // Set obscured region evas_filter_context_obscured_region_set(filter, pd->data->obscured); @@ -428,10 +428,11 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, // Request rendering from the object itself (child class) evas_filter_program_padding_get(pd->data->chain, &pad, NULL); - ok = evas_filter_input_render(eo_obj, filter, drawctx, NULL, pad.l, pad.r, pad.t, pad.b, 0, 0, do_async); + ok = evas_filter_input_render(eo_obj, filter, engine, output, drawctx, NULL, + pad.l, pad.r, pad.t, pad.b, 0, 0, do_async); if (!ok) ERR("Filter input render failed."); - ENFN->context_free(ENDT, drawctx); + ENFN->context_free(engine, drawctx); // Add post-run callback and run filter evas_filter_context_post_run_callback_set(filter, _filter_cb, pd); diff --git a/src/lib/evas/canvas/evas_gl.c b/src/lib/evas/canvas/evas_gl.c index 18c438bab2..a54de42236 100644 --- a/src/lib/evas/canvas/evas_gl.c +++ b/src/lib/evas/canvas/evas_gl.c @@ -29,6 +29,7 @@ struct _Evas_GL_Context struct _Evas_GL_Surface { void *data; + void *output; }; struct _Evas_GL_TLS_data diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h index 77b837d870..e21fec3a9b 100644 --- a/src/lib/evas/canvas/evas_image_private.h +++ b/src/lib/evas/canvas/evas_image_private.h @@ -148,7 +148,7 @@ struct _Evas_Image_Data void _evas_image_init_set(const Eina_File *f, const char *file, const char *key, Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o, Evas_Image_Load_Opts *lo); void _evas_image_done_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o); void _evas_image_cleanup(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o); -void *_evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, int *imagew, int *imageh, int *uvw, int *uvh, Eina_Bool filtered, Eina_Bool needs_post_render); +void *_evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, void *engine, void *output, void *context, void *surface, int x, int y, int *imagew, int *imageh, int *uvw, int *uvh, Eina_Bool filtered, Eina_Bool needs_post_render); /* Efl.Gfx.Fill */ void _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h); @@ -191,7 +191,7 @@ int _evas_image_animated_frame_get(const Eo *eo_obj); /* Efl.Canvas.Proxy */ void _evas_image_proxy_unset(Evas_Object *proxy, Evas_Object_Protected_Data *obj, Evas_Image_Data *o); void _evas_image_proxy_set(Evas_Object *proxy, Evas_Object *src); -void _evas_image_proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y, Eina_Bool do_async); +void _evas_image_proxy_error(Evas_Object *proxy, void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); Eina_Bool _evas_image_proxy_source_set(Eo *eo_obj, Evas_Object *eo_src); Evas_Object *_evas_image_proxy_source_get(const Eo *eo_obj); void _evas_image_proxy_source_clip_set(Eo *eo_obj, Eina_Bool source_clip); @@ -200,7 +200,7 @@ void _evas_image_proxy_source_events_set(Eo *eo_obj, Eina_Bool source_events); Eina_Bool _evas_image_proxy_source_events_get(const Eo *eo_obj); /* Efl.Canvas.Scene3d */ -void _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o, Evas_Canvas3D_Scene *scene); +void _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o, Evas_Canvas3D_Scene *scene, void *engine, void *output); void _evas_image_3d_set(Evas_Object *eo_obj, Evas_Canvas3D_Scene *scene); void _evas_image_3d_unset(Evas_Object *eo_obj, Evas_Object_Protected_Data *image, Evas_Image_Data *o); diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 3f62b155d8..ceab232829 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -14,11 +14,11 @@ static Evas_Coord evas_object_image_figure_y_fill(Evas_Object *eo_obj, Evas_Obje static void evas_object_image_init(Evas_Object *eo_obj); static void evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async); + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, int l, int t, int r, int b, Eina_Bool skip_map, Eina_Bool do_async); static void evas_object_image_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj); @@ -898,7 +898,8 @@ _efl_canvas_image_internal_efl_file_save(const Eo *eo_obj, Evas_Image_Data *o, c EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE); evas_object_async_block(obj); - pixels = _evas_image_pixels_get((Eo *) eo_obj, obj, ENDT, NULL, NULL, 0, 0, + pixels = _evas_image_pixels_get((Eo *) eo_obj, obj, ENC, ENDT, NULL, NULL, + 0, 0, &imagew, &imageh, &uvw, &uvh, EINA_TRUE, EINA_TRUE); if (!pixels) goto no_pixels; @@ -1505,14 +1506,14 @@ evas_object_image_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) static void _draw_image(Evas_Object_Protected_Data *obj, - void *data, void *context, void *surface, void *image, + void *engine, void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async) { Eina_Bool async_unref; - async_unref = ENFN->image_draw(data, context, surface, + async_unref = ENFN->image_draw(engine, data, context, surface, image, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h, @@ -1532,14 +1533,14 @@ _draw_image(Evas_Object_Protected_Data *obj, void evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj, - void *data, void *context, void *surface, + void *engine, void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async) { Eina_Bool async_unref; - obj->layer->evas->engine.func->context_anti_alias_set(data, context, + obj->layer->evas->engine.func->context_anti_alias_set(engine, context, obj->cur->anti_alias); - async_unref = ENFN->image_map_draw(data, context, + async_unref = ENFN->image_map_draw(engine, data, context, surface, image, m, smooth, level, do_async); @@ -1558,7 +1559,7 @@ evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj, static void * evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o, - void *output, void *surface, void *pixels) + void *engine, void *output, void *surface, void *pixels) { Eina_Bool direct_override = EINA_FALSE, direct_force_off = EINA_FALSE; @@ -1572,16 +1573,16 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, { Evas_Native_Surface *ns; - ns = ENFN->image_native_get(ENDT, o->engine_data); + ns = ENFN->image_native_get(engine, o->engine_data); if (ns) { Eina_Bool direct_renderable = EINA_FALSE; // Check if we can do direct rendering... if (ENFN->gl_direct_override_get) - ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off); + ENFN->gl_direct_override_get(engine, &direct_override, &direct_force_off); if (ENFN->gl_surface_direct_renderable_get) - direct_renderable = ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override, surface); + direct_renderable = ENFN->gl_surface_direct_renderable_get(engine, ns, &direct_override, surface); if ( ((direct_override) || ((direct_renderable) && @@ -1599,9 +1600,9 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, ) && (!direct_force_off) ) { if (ENFN->gl_get_pixels_set) - ENFN->gl_get_pixels_set(output, o->pixels->func.get_pixels, o->pixels->func.get_pixels_data, eo_obj); + ENFN->gl_get_pixels_set(engine, o->pixels->func.get_pixels, o->pixels->func.get_pixels_data, eo_obj); if (ENFN->gl_image_direct_set) - ENFN->gl_image_direct_set(output, o->engine_data, EINA_TRUE); + ENFN->gl_image_direct_set(engine, o->engine_data, EINA_TRUE); o->direct_render = EINA_TRUE; } else @@ -1612,7 +1613,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, (ns->type == EVAS_NATIVE_SURFACE_X11)) { if (ENFN->context_flush) - ENFN->context_flush(output); + ENFN->context_flush(engine); } } @@ -1637,10 +1638,10 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, CRI("Evas_Image_Data geometry did change during pixels get callback !"); o->engine_data = ENFN->image_dirty_region - (ENDT, o->engine_data, + (engine, o->engine_data, 0, 0, o->cur->image.w, o->cur->image.h); - if (o->engine_data != pixels) - pixels = o->engine_data; + if (o->engine_data != pixels) + pixels = o->engine_data; } o->dirty_pixels = EINA_FALSE; } @@ -1650,28 +1651,28 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, if (o->direct_render && ENFN->image_native_get) { Evas_Native_Surface *ns; - ns = ENFN->image_native_get(output, o->engine_data); + ns = ENFN->image_native_get(engine, o->engine_data); if (ENFN->gl_direct_override_get) - ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off); + ENFN->gl_direct_override_get(engine, &direct_override, &direct_force_off); if (ENFN->gl_surface_direct_renderable_get) - ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override, surface); + ENFN->gl_surface_direct_renderable_get(engine, ns, &direct_override, surface); if (direct_override && !direct_force_off) { // always use direct rendering if (ENFN->gl_get_pixels_set) - ENFN->gl_get_pixels_set(output, o->pixels->func.get_pixels, o->pixels->func.get_pixels_data, eo_obj); + ENFN->gl_get_pixels_set(engine, o->pixels->func.get_pixels, o->pixels->func.get_pixels_data, eo_obj); if (ENFN->gl_image_direct_set) - ENFN->gl_image_direct_set(output, o->engine_data, EINA_TRUE); + ENFN->gl_image_direct_set(engine, o->engine_data, EINA_TRUE); } else { // Auto-fallback to FBO rendering (for perf & power consumption) if (ENFN->gl_get_pixels_pre) - ENFN->gl_get_pixels_pre(output); + ENFN->gl_get_pixels_pre(engine); o->pixels->func.get_pixels(o->pixels->func.get_pixels_data, obj->object); if (ENFN->gl_get_pixels_post) - ENFN->gl_get_pixels_post(output); + ENFN->gl_get_pixels_post(engine); o->direct_render = EINA_FALSE; } } @@ -1745,26 +1746,26 @@ _image_is_scaled(Evas_Object_Protected_Data *obj, Evas_Image_Data *o) EOLIAN static Eina_Bool _efl_canvas_image_internal_efl_canvas_filter_internal_filter_input_render( - Eo *eo_obj, Evas_Image_Data *o, void *_filter, void *context EINA_UNUSED, - void *data EINA_UNUSED, int l, int r EINA_UNUSED, int t, int b EINA_UNUSED, + Eo *eo_obj, Evas_Image_Data *o, + void *_filter, void *engine, void *output, void *context, void *data EINA_UNUSED, + int l, int r EINA_UNUSED, int t, int b EINA_UNUSED, int x, int y, Eina_Bool do_async) { Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Filter_Context *filter = _filter; - void *surface, *output, *ctx; + void *surface, *ctx; Eina_Bool ok; int W, H; W = obj->cur->geometry.w; H = obj->cur->geometry.h; - output = ENDT; // FIXME: In GL we could use the image even if scaled if (!_image_has_border(obj, o) && _image_is_filled(obj, o) && !_image_is_scaled(obj, o)) { int imagew, imageh, uvw, uvh; - surface = _evas_image_pixels_get(eo_obj, obj, output, NULL, NULL, x, y, + surface = _evas_image_pixels_get(eo_obj, obj, engine, output, context, NULL, x, y, &imagew, &imageh, &uvw, &uvh, EINA_FALSE, EINA_FALSE); ok = evas_filter_buffer_backing_set(filter, EVAS_FILTER_BUFFER_INPUT_ID, surface); @@ -1782,31 +1783,32 @@ _efl_canvas_image_internal_efl_canvas_filter_internal_filter_input_render( b = 0; } - ctx = ENFN->context_new(output); + ctx = ENFN->context_new(engine); if (o->cur->has_alpha && !obj->cur->snapshot) { - ENFN->context_color_set(output, ctx, 0, 0, 0, 0); - ENFN->context_render_op_set(output, ctx, EVAS_RENDER_COPY); - ENFN->rectangle_draw(output, ctx, surface, 0, 0, W, H, do_async); - ENFN->context_color_set(output, ctx, 255, 255, 255, 255); - ENFN->context_render_op_set(output, ctx, EVAS_RENDER_BLEND); + ENFN->context_color_set(engine, ctx, 0, 0, 0, 0); + ENFN->context_render_op_set(engine, ctx, EVAS_RENDER_COPY); + ENFN->rectangle_draw(engine, output, ctx, surface, 0, 0, W, H, do_async); + ENFN->context_color_set(engine, ctx, 255, 255, 255, 255); + ENFN->context_render_op_set(engine, ctx, EVAS_RENDER_BLEND); } - _evas_image_render(eo_obj, obj, output, ctx, surface, + _evas_image_render(eo_obj, obj, + engine, output, ctx, surface, x + l - obj->cur->geometry.x, y + t - obj->cur->geometry.y, l, t, r, b, EINA_TRUE, do_async); - ENFN->context_free(output, ctx); - ENFN->image_free(output, surface); + ENFN->context_free(engine, ctx); + ENFN->image_free(engine, surface); return EINA_TRUE; } static void evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data, - void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { Evas_Image_Data *o = type_private_data; @@ -1816,7 +1818,7 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v /* Proxy sanity */ if (o->proxyrendering) { - _evas_image_proxy_error(eo_obj, context, output, surface, x, y, EINA_FALSE); + _evas_image_proxy_error(eo_obj, engine, output, context, surface, x, y, EINA_FALSE); return; } @@ -1829,9 +1831,9 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v if (o->engine_data_prep) { - ENFN->context_multiplier_unset(output, context); - ENFN->context_render_op_set(ENDT, context, obj->cur->render_op); - ENFN->image_draw(output, context, surface, o->engine_data_prep, + ENFN->context_multiplier_unset(engine, context); + ENFN->context_render_op_set(engine, context, obj->cur->render_op); + ENFN->image_draw(engine, output, context, surface, o->engine_data_prep, 0, 0, obj->cur->geometry.w, obj->cur->geometry.h, obj->cur->geometry.x + x, obj->cur->geometry.y + y, obj->cur->geometry.w, obj->cur->geometry.h, @@ -1843,10 +1845,10 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v if (o->video_visible) { /* Create a transparent rectangle */ - ENFN->context_color_set(output, context, 0, 0, 0, 0); - ENFN->context_multiplier_unset(output, context); - ENFN->context_render_op_set(output, context, EVAS_RENDER_COPY); - ENFN->rectangle_draw(output, context, surface, + ENFN->context_color_set(engine, context, 0, 0, 0, 0); + ENFN->context_multiplier_unset(engine, context); + ENFN->context_render_op_set(engine, context, EVAS_RENDER_COPY); + ENFN->rectangle_draw(engine, output, context, surface, obj->cur->geometry.x + x, obj->cur->geometry.y + y, obj->cur->geometry.w, obj->cur->geometry.h, do_async); @@ -1854,43 +1856,44 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v return; } - ENFN->context_color_set(output, context, 255, 255, 255, 255); + ENFN->context_color_set(engine, context, 255, 255, 255, 255); if ((obj->cur->cache.clip.r == 255) && (obj->cur->cache.clip.g == 255) && (obj->cur->cache.clip.b == 255) && (obj->cur->cache.clip.a == 255)) { - ENFN->context_multiplier_unset(output, context); + ENFN->context_multiplier_unset(engine, context); } else - ENFN->context_multiplier_set(output, context, + ENFN->context_multiplier_set(engine, context, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); - ENFN->context_render_op_set(output, context, obj->cur->render_op); + ENFN->context_render_op_set(engine, context, obj->cur->render_op); // Clear out the pixel get stuff.. if (ENFN->gl_get_pixels_set) - ENFN->gl_get_pixels_set(output, NULL, NULL, NULL); + ENFN->gl_get_pixels_set(engine, NULL, NULL, NULL); if (ENFN->gl_image_direct_set) - ENFN->gl_image_direct_set(output, o->engine_data, EINA_FALSE); + ENFN->gl_image_direct_set(engine, o->engine_data, EINA_FALSE); /* Render filter */ if (o->has_filter) { - if (evas_filter_object_render(eo_obj, obj, output, context, surface, x, y, do_async, EINA_FALSE)) + if (evas_filter_object_render(eo_obj, obj, engine, output, context, surface, x, y, do_async, EINA_FALSE)) return; } - _evas_image_render(eo_obj, obj, output, context, surface, x, y, 0, 0, 0, 0, EINA_FALSE, do_async); + _evas_image_render(eo_obj, obj, engine, output, context, surface, x, y, 0, 0, 0, 0, EINA_FALSE, do_async); } void * _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, - void *output, void *context, void *surface, int x, int y, + void *engine, void *output, void *context, void *surface, + int x, int y, int *imagew, int *imageh, int *uvw, int *uvh, Eina_Bool filtered, Eina_Bool needs_post_render) { @@ -1912,13 +1915,13 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, if (pixels) { - ENFN->image_size_get(ENDT, pixels, imagew, imageh); + ENFN->image_size_get(engine, pixels, imagew, imageh); *uvw = *imagew; *uvh = *imageh; } else if (o->cur->scene) { - _evas_image_3d_render(obj->layer->evas->evas, eo_obj, obj, o, o->cur->scene); + _evas_image_3d_render(obj->layer->evas->evas, eo_obj, obj, o, o->cur->scene, engine, output); pixels = obj->data_3d->surface; *imagew = obj->data_3d->w; *imageh = obj->data_3d->h; @@ -1938,7 +1941,7 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, // normal image (from file or user pixel set) needs_post_render = EINA_FALSE; if (output && surface) - pixels = evas_process_dirty_pixels(eo_obj, obj, o, output, surface, o->engine_data); + pixels = evas_process_dirty_pixels(eo_obj, obj, o, engine, output, surface, o->engine_data); else pixels = o->engine_data; *imagew = o->cur->image.w; @@ -1967,7 +1970,7 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, /* check source_clip since we skip proxy_subrender here */ if (context && o->proxy_src_clip && source->cur->clipper) { - ENFN->context_clip_clip(ENDT, context, + ENFN->context_clip_clip(engine, context, source->cur->clipper->cur->cache.clip.x + x, source->cur->clipper->cur->cache.clip.y + y, source->cur->clipper->cur->cache.clip.w, @@ -2000,7 +2003,7 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, static void _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, - void *output, void *context, void *surface, int x, int y, + void *engine, void *output, void *context, void *surface, int x, int y, int l, int t, int r, int b, Eina_Bool skip_map, Eina_Bool do_async) { Evas_Image_Data *o = obj->private_data; @@ -2009,11 +2012,11 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, int idw, idh, idx, idy; void *pixels; - pixels = _evas_image_pixels_get(eo_obj, obj, output, context, surface, x, y, + pixels = _evas_image_pixels_get(eo_obj, obj, engine, output, context, surface, x, y, &imagew, &imageh, &uvw, &uvh, EINA_FALSE, EINA_FALSE); if (!pixels) return; - if (ENFN->context_clip_get(ENDT, context, NULL, NULL, &cw, &ch) && (!cw || !ch)) + if (ENFN->context_clip_get(engine, context, NULL, NULL, &cw, &ch) && (!cw || !ch)) return; if (!skip_map && (obj->map->cur.map) && (obj->map->cur.map->count > 3) @@ -2022,13 +2025,13 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, evas_object_map_update(eo_obj, x, y, imagew, imageh, uvw, uvh); evas_draw_image_map_async_check( - obj, output, context, surface, pixels, obj->map->spans, + obj, engine, output, context, surface, pixels, obj->map->spans, o->cur->smooth_scale | obj->map->cur.map->smooth, 0, do_async); return; } - ENFN->image_scale_hint_set(output, pixels, o->scale_hint); + ENFN->image_scale_hint_set(engine, pixels, o->scale_hint); 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); if (idw < 1) idw = 1; @@ -2086,7 +2089,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, (o->cur->border.t == 0) && (o->cur->border.b == 0) && (o->cur->border.fill != 0)) { - _draw_image(obj, output, context, surface, pixels, + _draw_image(obj, engine, output, context, surface, pixels, 0, 0, imagew, imageh, offx + ix, offy + iy, iw, ih, o->cur->smooth_scale, do_async); @@ -2179,7 +2182,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = bl; inh = bt; outx = ox; outy = oy; outw = bsl; outh = bst; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .##. // | | // '--' @@ -2187,7 +2190,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = imw - bl - br; inh = bt; outx = ox + bsl; outy = oy; outw = iw - bsl - bsr; outh = bst; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .--# // | | // '--' @@ -2195,7 +2198,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = br; inh = bt; outx = ox + iw - bsr; outy = oy; outw = bsr; outh = bst; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .--. // # | // '--' @@ -2203,7 +2206,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = bl; inh = imh - bt - bb; outx = ox; outy = oy + bst; outw = bsl; outh = ih - bst - bsb; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .--. // |##| // '--' @@ -2218,12 +2221,12 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, (!obj->clip.mask) && (obj->cur->render_op == EVAS_RENDER_BLEND)) { - ENFN->context_render_op_set(output, context, EVAS_RENDER_COPY); - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); - ENFN->context_render_op_set(output, context, obj->cur->render_op); + ENFN->context_render_op_set(engine, context, EVAS_RENDER_COPY); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + ENFN->context_render_op_set(engine, context, obj->cur->render_op); } else - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); } // .--. // | # @@ -2232,7 +2235,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = br; inh = imh - bt - bb; outx = ox + iw - bsr; outy = oy + bst; outw = bsr; outh = ih - bst - bsb; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .--. // | | // #--' @@ -2240,7 +2243,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = bl; inh = bb; outx = ox; outy = oy + ih - bsb; outw = bsl; outh = bsb; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .--. // | | // '##' @@ -2248,7 +2251,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = imw - bl - br; inh = bb; outx = ox + bsl; outy = oy + ih - bsb; outw = iw - bsl - bsr; outh = bsb; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); // .--. // | | // '--# @@ -2256,7 +2259,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, inw = br; inh = bb; outx = ox + iw - bsr; outy = oy + ih - bsb; outw = bsr; outh = bsb; - _draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); + _draw_image(obj, engine, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async); } idy += idh; if (dobreak_h) break; @@ -2984,7 +2987,7 @@ evas_object_image_is_inside(Evas_Object *eo_obj, /* the following code is similar to evas_object_image_render(), but doesn't * draw, just get the pixels so we can check the transparency. */ - pixels = _evas_image_pixels_get(eo_obj, obj, ENDT, NULL, NULL, 0, 0, + pixels = _evas_image_pixels_get(eo_obj, obj, ENC, ENDT, NULL, NULL, 0, 0, &imagew, &imageh, &uvw, &uvh, EINA_TRUE, EINA_FALSE); if (!pixels) return is_inside; diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c index 5571c58032..d61ef40fce 100644 --- a/src/lib/evas/canvas/evas_object_line.c +++ b/src/lib/evas/canvas/evas_object_line.c @@ -28,10 +28,10 @@ struct _Evas_Line_Data /* private methods for line objects */ static void evas_object_line_init(Evas_Object *eo_obj); static void evas_object_line_render(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_line_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); @@ -226,27 +226,27 @@ _evas_line_efl_object_constructor(Eo *eo_obj, Evas_Line_Data *class_data EINA_UN static void evas_object_line_render(Evas_Object *eo_obj EINA_UNUSED, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async) { Evas_Line_Data *o = type_private_data; /* render object to surface with context, and offxet by x,y */ - obj->layer->evas->engine.func->context_color_set(output, + obj->layer->evas->engine.func->context_color_set(engine, context, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_anti_alias_set(output, context, + obj->layer->evas->engine.func->context_multiplier_unset(engine, context); + obj->layer->evas->engine.func->context_anti_alias_set(engine, context, obj->cur->anti_alias); - obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->layer->evas->engine.func->context_render_op_set(engine, context, obj->cur->render_op); - obj->layer->evas->engine.func->line_draw(output, + obj->layer->evas->engine.func->line_draw(engine, output, context, surface, o->cur.cache.x1 + x, diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 734bee62c3..c9f5192973 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -695,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(ENDT, + obj->layer->evas->engine.func->output_redraws_rect_add(ENC, ENDT, x + e->framespace.x, y + e->framespace.y, w, h); @@ -710,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(ENDT, + obj->layer->evas->engine.func->output_redraws_rect_add(ENC, ENDT, x + e->framespace.x, y + e->framespace.y, w, h); @@ -733,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(ENDT, + obj->layer->evas->engine.func->output_redraws_rect_add(ENC, ENDT, x + e->framespace.x, y + e->framespace.y, w, h); @@ -745,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(ENDT, + obj->layer->evas->engine.func->output_redraws_rect_add(ENC, ENDT, x + e->framespace.x, y + e->framespace.y, w, h); diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c index b819fdf6b1..74ad28cde6 100644 --- a/src/lib/evas/canvas/evas_object_polygon.c +++ b/src/lib/evas/canvas/evas_object_polygon.c @@ -20,7 +20,7 @@ static void evas_object_polygon_init(Evas_Object *eo_obj); static void evas_object_polygon_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); static void evas_object_polygon_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, @@ -267,40 +267,40 @@ evas_object_polygon_free(Evas_Object *eo_obj EINA_UNUSED, static void evas_object_polygon_render(Evas_Object *eo_obj EINA_UNUSED, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { Efl_Canvas_Polygon_Data *o = type_private_data; Eina_List *l; Efl_Canvas_Polygon_Point *p; /* render object to surface with context, and offxet by x,y */ - obj->layer->evas->engine.func->context_color_set(output, + obj->layer->evas->engine.func->context_color_set(engine, context, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->layer->evas->engine.func->context_multiplier_unset(engine, context); + obj->layer->evas->engine.func->context_render_op_set(engine, context, obj->cur->render_op); if (o->changed) { - o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(ENC, o->engine_data); + o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(engine, 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(ENC, + o->engine_data = obj->layer->evas->engine.func->polygon_point_add(engine, o->engine_data, p->x, p->y); } } if (o->engine_data) - obj->layer->evas->engine.func->polygon_draw(output, + obj->layer->evas->engine.func->polygon_draw(engine, + output, context, surface, o->engine_data, diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c index a36973ff97..0fe74f691e 100644 --- a/src/lib/evas/canvas/evas_object_rectangle.c +++ b/src/lib/evas/canvas/evas_object_rectangle.c @@ -21,10 +21,10 @@ struct _Efl_Canvas_Rectangle_Data /* private methods for rectangle objects */ static void evas_object_rectangle_init(Evas_Object *eo_obj); static void evas_object_rectangle_render(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_rectangle_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); @@ -183,35 +183,31 @@ nochange: static void evas_object_rectangle_render(Evas_Object *eo_obj EINA_UNUSED, - Evas_Object_Protected_Data *obj, - void *type_private_data EINA_UNUSED, - void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) + Evas_Object_Protected_Data *obj, + void *type_private_data EINA_UNUSED, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { /* render object to surface with context, and offxet by x,y */ - obj->layer->evas->engine.func->context_color_set(output, - context, - obj->cur->cache.clip.r, - obj->cur->cache.clip.g, - obj->cur->cache.clip.b, - obj->cur->cache.clip.a); - obj->layer->evas->engine.func->context_anti_alias_set(output, context, + obj->layer->evas->engine.func->context_color_set(engine, + context, + obj->cur->cache.clip.r, + obj->cur->cache.clip.g, + obj->cur->cache.clip.b, + obj->cur->cache.clip.a); + obj->layer->evas->engine.func->context_anti_alias_set(engine, context, obj->cur->anti_alias); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_render_op_set(output, context, - obj->cur->render_op); - obj->layer->evas->engine.func->rectangle_draw(output, - context, - surface, - obj->cur->geometry.x + x, - obj->cur->geometry.y + y, - obj->cur->geometry.w, - obj->cur->geometry.h, - do_async); -//// obj->cur->cache.geometry.x + x, -//// obj->cur->cache.geometry.y + y, -//// obj->cur->cache.geometry.w, -//// obj->cur->cache.geometry.h); + obj->layer->evas->engine.func->context_multiplier_unset(engine, context); + obj->layer->evas->engine.func->context_render_op_set(engine, context, + obj->cur->render_op); + obj->layer->evas->engine.func->rectangle_draw(engine, + output, + context, + surface, + obj->cur->geometry.x + x, + obj->cur->geometry.y + y, + obj->cur->geometry.w, + obj->cur->geometry.h, + do_async); } static void diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 805a623c4c..84188ae594 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -80,10 +80,10 @@ _eo_evas_smart_cb(void *data, const Efl_Event *event) /* private methods for smart objects */ static inline void evas_object_smart_init(Evas_Object *eo_obj); static void evas_object_smart_render(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_smart_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); @@ -1538,7 +1538,7 @@ evas_object_smart_init(Evas_Object *eo_obj) } static void -evas_object_smart_render(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, void *type_private_data EINA_UNUSED, void *output EINA_UNUSED, void *context EINA_UNUSED, void *surface EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, Eina_Bool do_async EINA_UNUSED) +evas_object_smart_render(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, void *type_private_data EINA_UNUSED, void *engine EINA_UNUSED, void *output EINA_UNUSED, void *context EINA_UNUSED, void *surface EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, Eina_Bool do_async EINA_UNUSED) { return; } diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index aa9b14dcfe..f56b45eb67 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -89,9 +89,10 @@ struct _Evas_Object_Text_Item /* private methods for text objects */ static void evas_object_text_init(Evas_Object *eo_obj); static void evas_object_text_render(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_text_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj); static void evas_object_text_render_pre(Evas_Object *eo_obj, @@ -1664,14 +1665,14 @@ evas_object_text_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) void evas_font_draw_async_check(Evas_Object_Protected_Data *obj, - void *data, void *context, void *surface, + void *engine, void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Text_Props *intl_props, Eina_Bool do_async) { Eina_Bool async_unref; - async_unref = obj->layer->evas->engine.func->font_draw(data, context, surface, + async_unref = obj->layer->evas->engine.func->font_draw(engine, data, context, surface, font, x, y, w, h, ow, oh, intl_props, do_async); if (do_async && async_unref) @@ -1721,8 +1722,7 @@ _evas_text_efl_canvas_filter_internal_filter_state_prepare(Eo *eo_obj, Evas_Text EOLIAN static Eina_Bool _evas_text_efl_canvas_filter_internal_filter_input_render(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, - void *_filter, void *drawctx, - void *data EINA_UNUSED, + void *_filter, void *engine, void *output, void *drawctx, void *draw EINA_UNUSED, int l, int r EINA_UNUSED, int t, int b EINA_UNUSED, int x, int y, Eina_Bool do_async) @@ -1733,7 +1733,7 @@ _evas_text_efl_canvas_filter_internal_filter_input_render(Eo *eo_obj EINA_UNUSED EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) if ((o->font) && (it->text_props.len > 0)) { - if (!evas_filter_font_draw(filter, drawctx, + if (!evas_filter_font_draw(filter, engine, output, drawctx, EVAS_FILTER_BUFFER_INPUT_ID, o->font, x + l + it->x, y + t + (int) o->max_ascent, @@ -1749,7 +1749,7 @@ static void evas_object_text_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { int i, j; @@ -1768,14 +1768,14 @@ evas_object_text_render(Evas_Object *eo_obj, /* render object to surface with context, and offxet by x,y */ _evas_object_text_pad_get(eo_obj, o, &sl, NULL, &st, NULL); - ENFN->context_multiplier_unset(output, context); - ENFN->context_render_op_set(output, context, obj->cur->render_op); + ENFN->context_multiplier_unset(engine, context); + ENFN->context_render_op_set(engine, context, obj->cur->render_op); /* FIXME: This clipping is just until we fix inset handling correctly. */ - ENFN->context_clip_clip(output, context, - obj->cur->geometry.x + x, - obj->cur->geometry.y + y, - obj->cur->geometry.w, - obj->cur->geometry.h); + ENFN->context_clip_clip(engine, context, + obj->cur->geometry.x + x, + obj->cur->geometry.y + y, + obj->cur->geometry.w, + obj->cur->geometry.h); /* ENFN->context_color_set(output, @@ -1790,7 +1790,7 @@ evas_object_text_render(Evas_Object *eo_obj, obj->cur->geometry.h); */ #define COLOR_ONLY_SET(object, sub, col) \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ object->sub.col.r, \ object->sub.col.g, \ object->sub.col.b, \ @@ -1799,14 +1799,14 @@ evas_object_text_render(Evas_Object *eo_obj, #define COLOR_SET(object, sub, col) \ if (obj->cur->clipper)\ { \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ ((int)object->sub.col.r * ((int)obj->cur->clipper->cur->cache.clip.r + 1)) >> 8, \ ((int)object->sub.col.g * ((int)obj->cur->clipper->cur->cache.clip.g + 1)) >> 8, \ ((int)object->sub.col.b * ((int)obj->cur->clipper->cur->cache.clip.b + 1)) >> 8, \ ((int)object->sub.col.a * ((int)obj->cur->clipper->cur->cache.clip.a + 1)) >> 8); \ } \ else\ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ object->sub.col.r, \ object->sub.col.g, \ object->sub.col.b, \ @@ -1815,43 +1815,46 @@ evas_object_text_render(Evas_Object *eo_obj, #define COLOR_SET_AMUL(object, sub, col, amul) \ if (obj->cur->clipper) \ { \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ (((int)object->sub.col.r) * ((int)obj->cur->clipper->cur->cache.clip.r) * (amul)) / 65025, \ (((int)object->sub.col.g) * ((int)obj->cur->clipper->cur->cache.clip.g) * (amul)) / 65025, \ (((int)object->sub.col.b) * ((int)obj->cur->clipper->cur->cache.clip.b) * (amul)) / 65025, \ (((int)object->sub.col.a) * ((int)obj->cur->clipper->cur->cache.clip.a) * (amul)) / 65025); \ } \ else \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ (((int)object->sub.col.r) * (amul)) / 255, \ (((int)object->sub.col.g) * (amul)) / 255, \ (((int)object->sub.col.b) * (amul)) / 255, \ (((int)object->sub.col.a) * (amul)) / 255); #define DRAW_TEXT(ox, oy) \ - if ((o->font) && (it->text_props.len > 0)) { \ - ENFN->context_cutout_target(output, context, \ + if ((o->font) && (it->text_props.len > 0)) { \ + ENFN->context_cutout_target(engine, context, \ obj->cur->geometry.x + x + sl + ox + it->x, \ - obj->cur->geometry.y + y + st + oy, \ - it->w, it->h); \ - evas_font_draw_async_check(obj, output, \ - context, \ - surface, \ - o->font, \ - obj->cur->geometry.x + x + sl + ox + it->x, \ - obj->cur->geometry.y + y + st + oy + \ - (int)o->max_ascent, \ - obj->cur->geometry.w, \ - obj->cur->geometry.h, \ - obj->cur->geometry.w, \ - obj->cur->geometry.h, \ - &it->text_props, \ - do_async); \ + obj->cur->geometry.y + y + st + oy, \ + it->w, it->h); \ + evas_font_draw_async_check(obj, output, \ + engine, \ + context, \ + surface, \ + o->font, \ + obj->cur->geometry.x + x + sl + ox + it->x, \ + obj->cur->geometry.y + y + st + oy + \ + (int)o->max_ascent, \ + obj->cur->geometry.w, \ + obj->cur->geometry.h, \ + obj->cur->geometry.w, \ + obj->cur->geometry.h, \ + &it->text_props, \ + do_async); \ } if (o->has_filter) { - if (evas_filter_object_render(eo_obj, obj, output, context, surface, x, y, do_async, EINA_TRUE)) + if (evas_filter_object_render(eo_obj, obj, + engine, output, context, surface, + x, y, do_async, EINA_TRUE)) return; } @@ -1931,7 +1934,7 @@ evas_object_text_render(Evas_Object *eo_obj, } EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { - ENFN->context_multiplier_set(output, context, 0, 0, 0, 0); + ENFN->context_multiplier_set(engine, context, 0, 0, 0, 0); /* Shadows */ if (haveshad) { @@ -2007,10 +2010,10 @@ evas_object_text_render(Evas_Object *eo_obj, } /* normal text */ - ENFN->context_multiplier_unset(output, context); + ENFN->context_multiplier_unset(engine, context); if (obj->cur->clipper) - ENFN->context_multiplier_set(output, context, + ENFN->context_multiplier_set(engine, context, obj->cur->clipper->cur->cache.clip.r, obj->cur->clipper->cur->cache.clip.g, obj->cur->clipper->cur->cache.clip.b, @@ -2018,7 +2021,7 @@ evas_object_text_render(Evas_Object *eo_obj, COLOR_ONLY_SET(obj, cur->cache, clip); DRAW_TEXT(0, 0); - ENFN->context_multiplier_unset(output, context); + ENFN->context_multiplier_unset(engine, context); } } diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 0a53730c21..6448387dae 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -640,10 +640,10 @@ struct _Efl_Canvas_Text_Annotation_Iterator /* private methods for textblock objects */ static void evas_object_textblock_init(Evas_Object *eo_obj); static void evas_object_textblock_render(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_textblock_free(Evas_Object *eo_obj); static void evas_object_textblock_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, @@ -955,7 +955,7 @@ _format_unref_free(const Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt) { eina_stringshare_del(fmt->gfx_filter->name); if (fmt->gfx_filter->dc) - ENFN->context_free(ENDT, fmt->gfx_filter->dc); + ENFN->context_free(ENC, fmt->gfx_filter->dc); free(fmt->gfx_filter); } if ((obj->layer) && (obj->layer->evas)) @@ -2771,7 +2771,7 @@ _format_dup(Evas_Object *eo_obj, const Evas_Object_Textblock_Format *fmt) fmt2->gfx_filter = malloc(sizeof(*fmt2->gfx_filter)); memcpy(fmt2->gfx_filter, fmt->gfx_filter, sizeof(*fmt->gfx_filter)); fmt2->gfx_filter->name = eina_stringshare_ref(fmt->gfx_filter->name); - fmt2->gfx_filter->dc = ENFN->context_dup(ENDT, fmt->gfx_filter->dc); + fmt2->gfx_filter->dc = ENFN->context_dup(ENC, fmt->gfx_filter->dc); } return fmt2; @@ -13114,10 +13114,10 @@ _filter_target_position_calc(Evas_Object_Protected_Data *obj, static void evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async) + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async) { Evas_Object_Textblock_Paragraph *par, *start = NULL; Evas_Object_Textblock_Item *itr; @@ -13155,18 +13155,18 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, if (!o->paragraphs) return; /* render object to surface with context, and offxet by x,y */ - ENFN->context_multiplier_unset(output, context); - ENFN->context_multiplier_set(output, context, 0, 0, 0, 0); - ENFN->context_render_op_set(output, context, obj->cur->render_op); + ENFN->context_multiplier_unset(engine, context); + ENFN->context_multiplier_set(engine, context, 0, 0, 0, 0); + ENFN->context_render_op_set(engine, context, obj->cur->render_op); /* FIXME: This clipping is just until we fix inset handling correctly. */ - ENFN->context_clip_clip(output, context, - obj->cur->geometry.x + x, - obj->cur->geometry.y + y, - obj->cur->geometry.w, - obj->cur->geometry.h); - clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch); + ENFN->context_clip_clip(engine, context, + obj->cur->geometry.x + x, + obj->cur->geometry.y + y, + obj->cur->geometry.w, + obj->cur->geometry.h); + clip = ENFN->context_clip_get(engine, context, &cx, &cy, &cw, &ch); - ENFN->context_color_set(output, context, 0, 0, 0, 0); + ENFN->context_color_set(engine, context, 0, 0, 0, 0); ca = cr = cg = cb = 0; #define ITEM_WALK() \ @@ -13238,7 +13238,7 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, na = obj->cur->cache.clip.a * ti->parent.format->color.col.a; \ if (na != ca || nb != cb || ng != cg || nr != cr) \ { \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ nr / 255, ng / 255, nb / 255, na / 255); \ cr = nr; cg = ng; cb = nb; ca = na; \ } @@ -13250,23 +13250,23 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, na = obj->cur->cache.clip.a * ti->parent.format->color.col.a * (amul); \ if (na != ca || nb != cb || ng != cg || nr != cr) \ { \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ nr / 65025, ng / 65025, nb / 65025, na / 65025); \ cr = nr; cg = ng; cb = nb; ca = na; \ } #define DRAW_TEXT_FILTER(gf, ox, oy) do { \ - evas_filter_input_render(eo_obj, ti->gfx_filter->ctx, gf->dc, ti, \ + evas_filter_input_render(eo_obj, ti->gfx_filter->ctx, engine, output, gf->dc, ti, \ gf->pad.l, gf->pad.r, gf->pad.t, gf->pad.b, \ (ox), (oy), do_async); \ } while (0) #define DRAW_TEXT_NOFILTER(ox, oy) do { \ - ENFN->context_cutout_target(output, context, \ + ENFN->context_cutout_target(engine, context, \ obj->cur->geometry.x + ln->x - (ln->h * 4) + ti->parent.x + x + (ox) - 100, \ obj->cur->geometry.y + ln->par->y + ln->y - ln->h + y + (oy), \ ti->parent.w + (ln->h * 8), ln->h * 3); \ - evas_font_draw_async_check(obj, output, context, surface, \ + evas_font_draw_async_check(obj, engine, output, context, surface, \ ti->parent.format->font.font, \ obj->cur->geometry.x + ln->x + ti->parent.x + x + (ox), \ obj->cur->geometry.y + ln->par->y + ln->y + yoff + y + (oy), \ @@ -13293,11 +13293,12 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, na = obj->cur->cache.clip.a * oa; \ if (na != ca || nb != cb || ng != cg || nr != cr) \ { \ - ENFN->context_color_set(output, context, \ + ENFN->context_color_set(engine, context, \ nr / 255, ng / 255, nb / 255, na / 255); \ cr = nr; cg = ng; cb = nb; ca = na; \ } \ - ENFN->rectangle_draw(output, \ + ENFN->rectangle_draw(engine, \ + output, \ context, \ surface, \ obj->cur->geometry.x + ln->x + x + (ox), \ @@ -13466,7 +13467,7 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, if (!filter->redraw) continue; } - ENFN->image_free(ENDT, ti->gfx_filter->output); + ENFN->image_free(engine, ti->gfx_filter->output); ti->gfx_filter->output = NULL; } @@ -13484,8 +13485,8 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, // target position evas_filter_program_padding_get(pgm, &filter->pad, NULL); target = _filter_target_position_calc(obj, ti, x, y); - ENFN->context_color_set(ENDT, context, 255, 255, 255, 255); - ENFN->context_multiplier_set(ENDT, context, + ENFN->context_color_set(engine, context, 255, 255, 255, 255); + ENFN->context_multiplier_set(engine, context, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); evas_filter_context_proxy_render_all(ctx, eo_obj, EINA_FALSE); @@ -13497,13 +13498,13 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, // common data for all items (FIXME: should be common to object) if (!filter->dc) { - filter->dc = ENFN->context_new(ENDT); - ENFN->context_color_set(ENDT, filter->dc, 255, 255, 255, 255); + filter->dc = ENFN->context_new(engine); + ENFN->context_color_set(engine, filter->dc, 255, 255, 255, 255); } filter->eo_obj = eo_obj; filter->evas = obj->layer->evas; - ENFN->context_multiplier_unset(ENDT, context); + ENFN->context_multiplier_unset(engine, context); } /* shadows */ @@ -13707,10 +13708,10 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, /* Get the thickness, and save it for strikethrough of non-text items. */ strikethrough_thickness = underline_thickness = evas_common_font_instance_underline_thickness_get(NULL); underline_position = evas_common_font_instance_underline_position_get(NULL); - ENFN->context_multiplier_unset(output, context); + ENFN->context_multiplier_unset(engine, context); if (obj->cur->clipper) - ENFN->context_multiplier_set(output, context, + ENFN->context_multiplier_set(engine, context, obj->cur->clipper->cur->cache.clip.r, obj->cur->clipper->cur->cache.clip.g, obj->cur->clipper->cur->cache.clip.b, @@ -13779,9 +13780,9 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, target = _filter_target_position_calc(obj, ti, x, y); ca = cr = cb = cg = 255; - ENFN->context_color_set(ENDT, context, 255, 255, 255, 255); - ENFN->image_size_get(ENDT, buffer, &W, &H); - ENFN->image_draw(ENDT, context, surface, buffer, + ENFN->context_color_set(engine, context, 255, 255, 255, 255); + ENFN->image_size_get(engine, buffer, &W, &H); + ENFN->image_draw(engine, output, context, surface, buffer, 0, 0, W, H, target.x, target.y, W, H, 0, do_async); } else if (ctx) @@ -13810,7 +13811,7 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED, underline_position, underline_thickness); } ITEM_WALK_END(); - ENFN->context_multiplier_unset(output, context); + ENFN->context_multiplier_unset(engine, context); } EOLIAN static void @@ -13840,13 +13841,14 @@ _efl_canvas_text_efl_canvas_filter_internal_filter_state_prepare( EOLIAN static Eina_Bool _efl_canvas_text_efl_canvas_filter_internal_filter_input_render( - Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *pd EINA_UNUSED, void *filter, void *drawctx, - void *data, int l, int r EINA_UNUSED, int t, int b EINA_UNUSED, + Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *pd EINA_UNUSED, void *filter, + void *engine, void *output, void *drawctx, void *data, + int l, int r EINA_UNUSED, int t, int b EINA_UNUSED, int x, int y, Eina_Bool do_async) { Evas_Object_Textblock_Text_Item *ti = data; - return evas_filter_font_draw(filter, drawctx, + return evas_filter_font_draw(filter, engine, output, drawctx, EVAS_FILTER_BUFFER_INPUT_ID, ti->parent.format->font.font, x + l, diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c index 730df3226f..7045f271e2 100644 --- a/src/lib/evas/canvas/evas_object_textgrid.c +++ b/src/lib/evas/canvas/evas_object_textgrid.c @@ -90,10 +90,10 @@ struct _Evas_Object_Textgrid_Line /* private methods for textgrid objects */ static void evas_object_textgrid_init(Evas_Object *eo_obj); static void evas_object_textgrid_render(Evas_Object *eo_obj, - Evas_Object_Protected_Data *obj, - void *type_private_data, - void *output, void *context, void *surface, - int x, int y, Eina_Bool do_async); + Evas_Object_Protected_Data *obj, + void *type_private_data, + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); static void evas_object_textgrid_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); @@ -404,7 +404,7 @@ static void evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, void *type_private_data, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { Evas_Textgrid_Cell *cells; @@ -415,8 +415,8 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED, /* render object to surface with context, and offset by x,y */ Evas_Textgrid_Data *o = type_private_data; - ENFN->context_multiplier_unset(output, context); - ENFN->context_render_op_set(output, context, obj->cur->render_op); + ENFN->context_multiplier_unset(engine, context); + ENFN->context_render_op_set(engine, context, obj->cur->render_op); if (!(o->font_normal) || (!o->cur.cells)) return; @@ -524,13 +524,13 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED, xp = obj->cur->geometry.x + x; for (xx = 0; xx < row->rects_num; xx++) { - ENFN->context_color_set(output, context, + ENFN->context_color_set(engine, context, row->rects[xx].r, row->rects[xx].g, row->rects[xx].b, row->rects[xx].a); - ENFN->context_cutout_target(output, context, + ENFN->context_cutout_target(engine, context, xp + row->rects[xx].x, yp, row->rects[xx].w, h); - ENFN->rectangle_draw(output, context, surface, + ENFN->rectangle_draw(engine, output, context, surface, xp + row->rects[xx].x, yp, row->rects[xx].w, h, do_async); @@ -599,15 +599,15 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED, } while (font == current_font); - ENFN->context_cutout_target(output, context, + ENFN->context_cutout_target(engine, context, xp - w, yp + o->ascent - h, w * 3, h * 3); async_unref = - ENFN->multi_font_draw(output, context, surface, - current_font, - xp, - yp + o->ascent, - ww, hh, ww, hh, texts, do_async); + ENFN->multi_font_draw(engine, output, context, surface, + current_font, + xp, + yp + o->ascent, + ww, hh, ww, hh, texts, do_async); if (async_unref) evas_unref_queue_texts_put(obj->layer->evas, texts); else @@ -638,13 +638,13 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED, b = text->b; a = text->a; - ENFN->context_color_set(output, context, + ENFN->context_color_set(engine, context, r, g, b, a); font = _textgrid_font_get(o, text->bold, text->italic); - ENFN->context_cutout_target(output, context, + ENFN->context_cutout_target(engine, context, tx - w, ty - h, w * 3, h * 3); - evas_font_draw_async_check(obj, output, context, surface, + evas_font_draw_async_check(obj, engine, output, context, surface, font, tx, ty, ww, hh, ww, hh, props, do_async); } @@ -653,13 +653,13 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED, for (xx = 0; xx < row->lines_num; xx++) { - ENFN->context_color_set(output, context, + ENFN->context_color_set(engine, context, row->lines[xx].r, row->lines[xx].g, row->lines[xx].b, row->lines[xx].a); - ENFN->context_cutout_target(output, context, + ENFN->context_cutout_target(engine, context, xp + row->lines[xx].x, yp + row->lines[xx].y, row->lines[xx].w, 1); - ENFN->rectangle_draw(output, context, surface, + ENFN->rectangle_draw(engine, output, context, surface, xp + row->lines[xx].x, yp + row->lines[xx].y, row->lines[xx].w, 1, do_async); diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c index 7de216c207..3936b4f91e 100644 --- a/src/lib/evas/canvas/evas_object_vg.c +++ b/src/lib/evas/canvas/evas_object_vg.c @@ -15,7 +15,7 @@ const char *o_vg_type = o_type; static void evas_object_vg_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); static void evas_object_vg_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, @@ -144,7 +144,7 @@ _evas_vg_efl_object_finalize(Eo *obj, Evas_VG_Data *pd) static void _evas_vg_render(Evas_Object_Protected_Data *obj, Evas_VG_Data *vd, - void *output, void *context, void *surface, Efl_VG *n, + void *engine, void *output, void *context, void *surface, Efl_VG *n, Eina_Array *clips, Eina_Bool do_async) { if (efl_isa(n, EFL_VG_CONTAINER_CLASS)) @@ -157,7 +157,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Evas_VG_Data *vd, EINA_LIST_FOREACH(vc->children, l, child) _evas_vg_render(obj, vd, - output, context, surface, child, + engine, output, context, surface, child, clips, do_async); } else @@ -166,7 +166,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Evas_VG_Data *vd, nd = efl_data_scope_get(n, EFL_VG_CLASS); - obj->layer->evas->engine.func->ector_renderer_draw(output, context, surface, vd->engine_data, nd->renderer, clips, do_async); + obj->layer->evas->engine.func->ector_renderer_draw(engine, output, context, surface, vd->engine_data, nd->renderer, clips, do_async); if (do_async) eina_array_push(&vd->cleanup, efl_ref(nd->renderer)); @@ -177,7 +177,7 @@ static void evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, void *type_private_data, - void *output, void *context, void *surface, + void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { Evas_VG_Data *vd = type_private_data; @@ -190,35 +190,35 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED, // child of the main Ector_Surface (necessary for Evas_Map). if (!vd->engine_data) - vd->engine_data = obj->layer->evas->engine.func->ector_new(output, context, ector, surface); + vd->engine_data = obj->layer->evas->engine.func->ector_new(engine, context, ector, surface); /* render object to surface with context, and offxet by x,y */ - obj->layer->evas->engine.func->context_color_set(output, + obj->layer->evas->engine.func->context_color_set(engine, context, 255, 255, 255, 255); - obj->layer->evas->engine.func->context_multiplier_set(output, + obj->layer->evas->engine.func->context_multiplier_set(engine, context, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); - obj->layer->evas->engine.func->context_anti_alias_set(output, context, + obj->layer->evas->engine.func->context_anti_alias_set(engine, context, obj->cur->anti_alias); - obj->layer->evas->engine.func->context_render_op_set(output, context, + obj->layer->evas->engine.func->context_render_op_set(engine, context, obj->cur->render_op); - obj->layer->evas->engine.func->ector_begin(output, context, + obj->layer->evas->engine.func->ector_begin(engine, context, ector, surface, vd->engine_data, obj->cur->geometry.x + x, obj->cur->geometry.y + y, do_async); _evas_vg_render(obj, vd, - output, context, surface, + engine, output, context, surface, vd->root, NULL, do_async); - obj->layer->evas->engine.func->ector_end(output, context, ector, surface, vd->engine_data, do_async); + obj->layer->evas->engine.func->ector_end(engine, context, ector, surface, vd->engine_data, do_async); } static void diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c index 9a147d6553..d66fb0f396 100644 --- a/src/lib/evas/canvas/evas_out.c +++ b/src/lib/evas/canvas/evas_out.c @@ -58,9 +58,10 @@ efl_canvas_output_del(Efl_Canvas_Output *output) if (e->engine.func) { - e->engine.func->ector_destroy(output->output, + e->engine.func->ector_destroy(_evas_engine_context(e), output->ector); - e->engine.func->output_free(output->output); + e->engine.func->output_free(_evas_engine_context(e), + output->output); e->engine.func->info_free(output->canvas, output->info); } e->outputs = eina_list_remove(e->outputs, output); @@ -114,12 +115,14 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output, { if (e->engine.func->update) { - e->engine.func->update(output->output, info, e->output.w, e->output.h); + e->engine.func->update(_evas_engine_context(e), output->output, info, + e->output.w, e->output.h); } else { // For engine who do not provide an update function - e->engine.func->output_free(output->output); + e->engine.func->output_free(_evas_engine_context(e), + output->output); goto setup; } @@ -133,7 +136,8 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output, } setup: - output->output = e->engine.func->setup(info, e->output.w, e->output.h); + output->output = e->engine.func->setup(_evas_engine_context(e), info, + e->output.w, e->output.h); } return !!output->output; diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index aa99bfe64f..bb84209109 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -213,7 +213,7 @@ _evas_render_framespace_context_clip_clip(Evas_Public_Data *evas, void *ctx, fw = evas->viewport.w - evas->framespace.w; fh = evas->viewport.h - evas->framespace.h; - ENFN->context_clip_clip(ENDT, ctx, fx + ox, fy + oy, fw, fh); + ENFN->context_clip_clip(ENC, ctx, fx + ox, fy + oy, fw, fh); } static void @@ -302,12 +302,13 @@ _evas_render_can_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) static void _evas_render_prev_cur_clip_cache_add(Evas_Public_Data *evas, Evas_Object_Protected_Data *obj) { - ENFN->output_redraws_rect_add(ENDT, + // FIXME: Iterate over each output + ENFN->output_redraws_rect_add(ENC, ENDT, obj->prev->cache.clip.x + evas->framespace.x, obj->prev->cache.clip.y + evas->framespace.y, obj->prev->cache.clip.w, obj->prev->cache.clip.h); - ENFN->output_redraws_rect_add(ENDT, + ENFN->output_redraws_rect_add(ENC, ENDT, obj->cur->cache.clip.x + evas->framespace.x, obj->cur->cache.clip.y + evas->framespace.y, obj->cur->cache.clip.w, @@ -528,6 +529,7 @@ _evas_render_object_map_change_update(Evas_Public_Data *evas, Eina_Bool map, Eina_Bool hmap, int *redraw_all) { + // FIXME: handle multiple output Evas_Coord x = 0, y = 0, w = 0, h = 0; const int fx = evas->framespace.x; const int fy = evas->framespace.y; @@ -554,7 +556,7 @@ _evas_render_object_map_change_update(Evas_Public_Data *evas, obj->prev->clipper->prev->cache.clip.w, obj->prev->clipper->prev->cache.clip.h); } - ENFN->output_redraws_rect_add(ENDT, x + fx, y + fy, w, h); + ENFN->output_redraws_rect_add(ENC, ENDT, x + fx, y + fy, w, h); x = obj->map->cur.map->normal_geometry.x; y = obj->map->cur.map->normal_geometry.y; w = obj->map->cur.map->normal_geometry.w; @@ -567,7 +569,7 @@ _evas_render_object_map_change_update(Evas_Public_Data *evas, obj->cur->clipper->cur->cache.clip.w, obj->cur->clipper->cur->cache.clip.h); } - ENFN->output_redraws_rect_add(ENDT, x + fx, y + fy, w, h); + ENFN->output_redraws_rect_add(ENC, ENDT, x + fx, y + fy, w, h); } else if (hmap) { @@ -583,7 +585,7 @@ _evas_render_object_map_change_update(Evas_Public_Data *evas, obj->prev->clipper->prev->cache.clip.w, obj->prev->clipper->prev->cache.clip.h); } - ENFN->output_redraws_rect_add(ENDT, x + fx, y + fy, w, h); + ENFN->output_redraws_rect_add(ENC, ENDT, x + fx, y + fy, w, h); x = obj->cur->cache.clip.x; y = obj->cur->cache.clip.y; w = obj->cur->cache.clip.w; @@ -596,7 +598,7 @@ _evas_render_object_map_change_update(Evas_Public_Data *evas, obj->cur->clipper->cur->cache.clip.w, obj->cur->clipper->cur->cache.clip.h); } - ENFN->output_redraws_rect_add(ENDT, x + fx, y + fy, w, h); + ENFN->output_redraws_rect_add(ENC, ENDT, x + fx, y + fy, w, h); } } @@ -621,9 +623,10 @@ typedef struct void evas_render_update_del(Evas_Public_Data *evas, int x, int y, int w, int h) { + // FIXME: handle multiple output if (EINA_LIKELY((evas->update_del_redirect_array == NULL))) { - ENFN->output_redraws_rect_del(ENDT, x, y, w, h); + ENFN->output_redraws_rect_del(ENC, ENDT, x, y, w, h); } else { @@ -1624,11 +1627,11 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p if (proxy_render_data->source_clip) { /* trust cache.clip since we clip like the source */ - ENFN->context_clip_clip(ENDT, ctx, + ENFN->context_clip_clip(ENC, ctx, obj->cur->cache.clip.x + off_x, obj->cur->cache.clip.y + off_y, obj->cur->cache.clip.w, obj->cur->cache.clip.h); - ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch); + ENFN->context_clip_get(ENC, ctx, NULL, NULL, &cw, &ch); return ((cw > 0) && (ch > 0)); } @@ -1637,8 +1640,8 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p clipper = obj->cur->clipper; if (!clipper->cur->visible) return EINA_FALSE; clip = &clipper->cur->geometry; - ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h); - ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch); + ENFN->context_clip_clip(ENC, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h); + ENFN->context_clip_get(ENC, ctx, NULL, NULL, &cw, &ch); if ((cw <= 0) || (ch <= 0)) return EINA_FALSE; /* stop if we found the source object's clipper */ @@ -1688,7 +1691,7 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj obj->cur->clipper->cur->cache.clip.w, obj->cur->clipper->cur->cache.clip.h); - ENFN->context_clip_set(ENDT, ctx, x + off_x, y + off_y, w, h); + ENFN->context_clip_set(ENC, ctx, x + off_x, y + off_y, w, h); } else if (evas->is_frozen) { @@ -1703,7 +1706,7 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj y = obj->cur->clipper->cur->geometry.y + off_y; w = obj->cur->clipper->cur->geometry.w; h = obj->cur->clipper->cur->geometry.h; - ENFN->context_clip_clip(ENDT, ctx, x, y, w, h); + ENFN->context_clip_clip(ENC, ctx, x, y, w, h); } } } @@ -1764,9 +1767,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, obj->cur->cache.clip.r, obj->cur->cache.clip.g, obj->cur->cache.clip.b, obj->cur->cache.clip.a); { int _cu, _cc, _cm, _cx, _cy, _cw, _ch, _cr, _cg, _cb, _ca, _cmr, _cmg, _cmb, _cma; - _cu = ENFN->context_clip_get(ENDT, context, &_cx, &_cy, &_cw, &_ch); - _cc = ENFN->context_color_get(ENDT, context, &_cr, &_cg, &_cb, &_ca); - _cm = ENFN->context_multiplier_get(ENDT, context, &_cmr, &_cmg, &_cmb, &_cma); + _cu = ENFN->context_clip_get(ENC, context, &_cx, &_cy, &_cw, &_ch); + _cc = ENFN->context_color_get(ENC, context, &_cr, &_cg, &_cb, &_ca); + _cm = ENFN->context_multiplier_get(ENC, context, &_cmr, &_cmg, &_cmb, &_cma); RD(level, " context clip: [%d] %d,%d %dx%d ; color: [%d] {%d,%d,%d,%d} ; mult: [%d] {%d,%d,%d,%d}\n", _cu, _cx, _cy, _cw, _ch, _cc, _cr, _cg, _cb, _ca, _cm, _cmr, _cmg, _cmb, _cma); } @@ -1932,15 +1935,15 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, // and re-render those if (obj->map->cur.map->alpha) { - ctx = ENFN->context_new(ENDT); - ENFN->context_color_set(ENDT, ctx, 0, 0, 0, 0); - ENFN->context_render_op_set(ENDT, ctx, EVAS_RENDER_COPY); - ENFN->rectangle_draw(ENDT, ctx, obj->map->surface, + ctx = ENFN->context_new(ENC); + ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0); + ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY); + ENFN->rectangle_draw(ENC, ENDT, ctx, obj->map->surface, 0, 0, obj->map->surface_w, obj->map->surface_h, EINA_FALSE); - ENFN->context_free(ENDT, ctx); + ENFN->context_free(ENC, ctx); } - ctx = ENFN->context_new(ENDT); + ctx = ENFN->context_new(ENC); off_x2 = -obj->cur->geometry.x; off_y2 = -obj->cur->geometry.y; if (obj->is_smart) @@ -1976,19 +1979,19 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, obj->cur->geometry.w, obj->cur->geometry.h); - ENFN->context_clip_set(ENDT, ctx, x, y, w, h); + ENFN->context_clip_set(ENC, ctx, x, y, w, h); #ifdef REND_DBG int _c, _cx, _cy, _cw, _ch; - _c = ENFN->context_clip_get(ENDT, ctx, &_cx, &_cy, &_cw, &_ch); + _c = ENFN->context_clip_get(ENC, ctx, &_cx, &_cy, &_cw, &_ch); RD(level, " draw mapped obj: render(clip: [%d] %d,%d %dx%d)\n", _c, _cx, _cy, _cw, _ch); #endif // FIXME: Should this really be sync render? obj->func->render(eo_obj, obj, obj->private_data, - ENDT, ctx, + ENC, ENDT, ctx, obj->map->surface, off_x2, off_y2, EINA_FALSE); } - ENFN->context_free(ENDT, ctx); + ENFN->context_free(ENC, ctx); rendered = EINA_TRUE; } @@ -2007,9 +2010,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, /* duplicate context and reset clip */ // FIXME: Shouldn't we use a new, clean context? - ctx = ENFN->context_dup(ENDT, context); - ENFN->context_clip_unset(ENDT, ctx); - //ENFN->context_multiplier_unset(ENDT, ctx); // this probably should be here, too + ctx = ENFN->context_dup(ENC, context); + ENFN->context_clip_unset(ENC, ctx); + //ENFN->context_multiplier_unset(ENC, ctx); // this probably should be here, too if (obj->map->surface) { @@ -2051,7 +2054,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, if (mask->mask->surface) { - ENFN->context_clip_image_set(ENDT, ctx, mask->mask->surface, + ENFN->context_clip_image_set(ENC, ctx, mask->mask->surface, mask->cur->geometry.x + off_x, mask->cur->geometry.y + off_y, evas, do_async); @@ -2063,24 +2066,24 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, { if (!mapped) { - ENFN->context_clip_clip(ENDT, ctx, ecx, ecy, ecw, ech); + ENFN->context_clip_clip(ENC, ctx, ecx, ecy, ecw, ech); if (!_is_obj_in_framespace(obj, evas)) { _evas_render_framespace_context_clip_clip (evas, ctx, off_x - evas->framespace.x, off_y - evas->framespace.y); } } - ENFN->context_multiplier_unset(ENDT, ctx); - ENFN->context_render_op_set(ENDT, ctx, obj->cur->render_op); + ENFN->context_multiplier_unset(ENC, ctx); + ENFN->context_render_op_set(ENC, ctx, obj->cur->render_op); #ifdef REND_DBG int _c, _cx, _cy, _cw, _ch; - _c = ENFN->context_clip_get(ENDT, ctx, &_cx, &_cy, &_cw, &_ch); + _c = ENFN->context_clip_get(ENC, ctx, &_cx, &_cy, &_cw, &_ch); RD(level, " draw image map(clip: [%d] %d,%d %dx%d)\n", _c, _cx, _cy, _cw, _ch); #endif evas_draw_image_map_async_check - (obj, ENDT, ctx, surface, - obj->map->surface, obj->map->spans, - obj->map->cur.map->smooth, 0, do_async); + (obj, ENC, ENDT, ctx, surface, + obj->map->surface, obj->map->spans, + obj->map->cur.map->smooth, 0, do_async); } } @@ -2232,7 +2235,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, #endif obj->func->render(eo_obj, obj, obj->private_data, - ENDT, ctx, surface, off_x, off_y, EINA_FALSE); + ENC, ENDT, ctx, surface, off_x, off_y, EINA_FALSE); } } else if (!obj->is_smart) @@ -2284,7 +2287,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, #endif obj->func->render(eo_obj, obj, obj->private_data, - ENDT, ctx, surface, + ENC, ENDT, ctx, surface, off_x, off_y, do_async); } if (obj->changed_map) clean_them = EINA_TRUE; @@ -2356,11 +2359,11 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_ } eina_evlog("+proxy_fill", eo_proxy, 0.0, NULL); - ctx = ENFN->context_new(ENDT); - ENFN->context_color_set(ENDT, ctx, 0, 0,0, 0); - ENFN->context_render_op_set(ENDT, ctx, EVAS_RENDER_COPY); - ENFN->rectangle_draw(ENDT, ctx, proxy_write->surface, 0, 0, w, h, do_async); - ENFN->context_free(ENDT, ctx); + ctx = ENFN->context_new(ENC); + ENFN->context_color_set(ENC, ctx, 0, 0,0, 0); + ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY); + ENFN->rectangle_draw(ENC, ENDT, ctx, proxy_write->surface, 0, 0, w, h, do_async); + ENFN->context_free(ENC, ctx); eina_evlog("-proxy_fill", eo_proxy, 0.0, NULL); Evas_Proxy_Render_Data proxy_render_data = { @@ -2374,15 +2377,15 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_ /* protect changes to the objects' cache.clip */ evas_event_freeze(evas->evas); - ctx = ENFN->context_new(ENDT); + ctx = ENFN->context_new(ENC); evas_render_mapped(evas, eo_source, source, ctx, proxy_write->surface, -source->cur->geometry.x, -source->cur->geometry.y, level + 1, 0, 0, evas->output.w, evas->output.h, &proxy_render_data, level + 1, do_async); - ENFN->context_free(ENDT, ctx); + ENFN->context_free(ENC, ctx); - proxy_write->surface = ENFN->image_dirty_region(ENDT, proxy_write->surface, 0, 0, w, h); + proxy_write->surface = ENFN->image_dirty_region(ENC, proxy_write->surface, 0, 0, w, h); /* restore previous state */ evas_event_thaw(evas->evas); @@ -2539,23 +2542,23 @@ evas_render_mask_subrender(Evas_Public_Data *evas, /* Clear surface with transparency */ eina_evlog("+mask_rect_clear", mask->object, 0.0, NULL); - ctx = ENFN->context_new(ENDT); - ENFN->context_color_set(ENDT, ctx, 0, 0, 0, 0); - ENFN->context_render_op_set(ENDT, ctx, EVAS_RENDER_COPY); - ENFN->rectangle_draw(ENDT, ctx, mdata->surface, 0, 0, w, h, do_async); - ENFN->context_free(ENDT, ctx); + ctx = ENFN->context_new(ENC); + ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0); + ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY); + ENFN->rectangle_draw(ENC, ENDT, ctx, mdata->surface, 0, 0, w, h, do_async); + ENFN->context_free(ENC, ctx); eina_evlog("-mask_rect_clear", mask->object, 0.0, NULL); /* Render mask to RGBA surface */ - ctx = ENFN->context_new(ENDT); + ctx = ENFN->context_new(ENC); if (prev_mask) { - ENFN->context_clip_image_set(ENDT, ctx, + ENFN->context_clip_image_set(ENC, ctx, prev_mask->mask->surface, prev_mask->cur->geometry.x - x, prev_mask->cur->geometry.y - y, evas, do_async); - ENFN->context_clip_set(ENDT, ctx, + ENFN->context_clip_set(ENC, ctx, prev_mask->cur->geometry.x - x, prev_mask->cur->geometry.y - y, prev_mask->cur->geometry.w, @@ -2565,7 +2568,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas, if (EINA_LIKELY(!mask->is_smart)) { mask->func->render(mask->object, mask, mask->private_data, - ENDT, ctx, mdata->surface, -x, -y, do_async); + ENC, ENDT, ctx, mdata->surface, -x, -y, do_async); } else { @@ -2574,7 +2577,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas, -x, -y, 2, 0, 0, evas->output.w, evas->output.h, NULL, level, do_async); } - ENFN->context_free(ENDT, ctx); + ENFN->context_free(ENC, ctx); /* BEGIN HACK */ @@ -2687,7 +2690,7 @@ _evas_render_cutout_add(Evas_Public_Data *evas, void *context, coh -= cutout_margin->t + cutout_margin->b; } if ((cow <= 0) || (coh <= 0)) return; - ENFN->context_cutout_add(ENDT, context, cox + off_x, coy + off_y, cow, coh); + ENFN->context_cutout_add(ENC, context, cox + off_x, coy + off_y, cow, coh); } void @@ -2758,6 +2761,7 @@ _is_obj_in_rect(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, } else { + // FIXME: handle multiple output if (evas_object_is_in_output_rect(eo_obj, obj, x, y, w, h)) return EINA_TRUE; } @@ -2847,7 +2851,8 @@ skip_obscures: if (add_rect || need_redraw) { // FIXME: Only add necessary rects (if object itself hasn't changed) - ENFN->output_redraws_rect_add(ENDT, x, y, w, h); + // FIXME: handle multiple output + ENFN->output_redraws_rect_add(ENC, ENDT, x, y, w, h); } end: @@ -2880,7 +2885,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, /* build obscuring objects list (in order from bottom to top) */ if (alpha) { - ENFN->context_clip_set(ENDT, context, ux + off_x, uy + off_y, uw, uh); + ENFN->context_clip_set(ENC, context, ux + off_x, uy + off_y, uw, uh); } for (i = 0; i < evas->obscuring_objects.count; ++i) { @@ -2902,12 +2907,12 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, } if (alpha) { - ENFN->context_color_set(ENDT, context, 0, 0, 0, 0); - ENFN->context_multiplier_unset(ENDT, context); - ENFN->context_render_op_set(ENDT, context, EVAS_RENDER_COPY); - ENFN->rectangle_draw(ENDT, context, surface, cx, cy, cw, ch, do_async); - ENFN->context_cutout_clear(ENDT, context); - ENFN->context_clip_unset(ENDT, context); + ENFN->context_color_set(ENC, context, 0, 0, 0, 0); + ENFN->context_multiplier_unset(ENC, context); + ENFN->context_render_op_set(ENC, context, EVAS_RENDER_COPY); + ENFN->rectangle_draw(ENC, ENDT, context, surface, cx, cy, cw, ch, do_async); + ENFN->context_cutout_clear(ENC, context); + ENFN->context_clip_unset(ENC, context); } eina_evlog("-render_setup", eo_e, 0.0, NULL); @@ -2967,7 +2972,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, obj->cur->cache.clip.h); } - ENFN->context_clip_set(ENDT, context, x, y, w, h); + ENFN->context_clip_set(ENC, context, x, y, w, h); mask = obj->clip.mask; if (mask) @@ -2979,7 +2984,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, if (mask->mask->surface) { - ENFN->context_clip_image_set(ENDT, context, + ENFN->context_clip_image_set(ENC, context, mask->mask->surface, mask->cur->geometry.x + off_x, mask->cur->geometry.y + off_y, @@ -3020,7 +3025,7 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, } } #endif - ENFN->context_cutout_target(ENDT, context, + ENFN->context_cutout_target(ENC, context, off_x + obj->cur->cache.clip.x, off_y + obj->cur->cache.clip.y, obj->cur->cache.clip.w, @@ -3031,9 +3036,9 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas, off_y + fy, 0, cx, cy, cw, ch, NULL, level + 3, do_async); - ENFN->context_cutout_clear(ENDT, context); + ENFN->context_cutout_clear(ENC, context); - if (mask) ENFN->context_clip_image_unset(ENDT, context); + if (mask) ENFN->context_clip_image_unset(ENC, context); } } } @@ -3058,6 +3063,7 @@ evas_render_updates_internal(Evas *eo_e, void *done_data, Eina_Bool do_async) { + // FIXME: handle multiple output Evas_Object *eo_obj; Evas_Object_Protected_Data *obj; Evas_Public_Data *evas, *e; @@ -3174,7 +3180,7 @@ evas_render_updates_internal(Evas *eo_e, eina_evlog("+render_phase3", eo_e, 0.0, NULL); EINA_LIST_FREE(e->damages, r) { - ENFN->output_redraws_rect_add(ENDT, r->x, r->y, r->w, r->h); + ENFN->output_redraws_rect_add(ENC, ENDT, r->x, r->y, r->w, r->h); eina_rectangle_free(r); } eina_evlog("-render_phase3", eo_e, 0.0, NULL); @@ -3183,12 +3189,12 @@ evas_render_updates_internal(Evas *eo_e, eina_evlog("+render_phase4", eo_e, 0.0, NULL); if (e->viewport.changed) { - ENFN->output_redraws_rect_add(ENDT, 0, 0, e->output.w, e->output.h); + ENFN->output_redraws_rect_add(ENC, ENDT, 0, 0, e->output.w, e->output.h); } if (e->output.changed) { - ENFN->output_resize(ENDT, e->output.w, e->output.h); - ENFN->output_redraws_rect_add(ENDT, 0, 0, e->output.w, e->output.h); + ENFN->output_resize(ENC, ENDT, e->output.w, e->output.h); + ENFN->output_redraws_rect_add(ENC, ENDT, 0, 0, e->output.w, e->output.h); } if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h)) { @@ -3201,14 +3207,14 @@ evas_render_updates_internal(Evas *eo_e, * which covers the Whole viewport. This is because 'framespace' is * defined as "the space IN the viewport which is Occupied by the * window frame" */ - ENFN->output_redraws_rect_add(ENDT, + ENFN->output_redraws_rect_add(ENC, ENDT, e->viewport.x, e->viewport.y, e->viewport.w, e->viewport.h); } if (redraw_all) { - ENFN->output_redraws_rect_add(ENDT, 0, 0, e->output.w, e->output.h); + ENFN->output_redraws_rect_add(ENC, ENDT, 0, 0, e->output.w, e->output.h); } eina_evlog("-render_phase4", eo_e, 0.0, NULL); @@ -3277,9 +3283,10 @@ evas_render_updates_internal(Evas *eo_e, if (do_async) _evas_render_busy_begin(); eina_evlog("+render_surface", eo_e, 0.0, NULL); + // FIXME: handle multiple output while ((surface = ENFN->output_redraws_next_update_get - (ENDT, + (ENC, ENDT, &ux, &uy, &uw, &uh, &cx, &cy, &cw, &ch))) { @@ -3330,7 +3337,7 @@ evas_render_updates_internal(Evas *eo_e, skip_cutouts = EINA_TRUE; RD(0, " SNAPSHOT %s [sfc:%p ur:%d,%d %dx%d]\n", RDNAME(snap), pseudo_canvas, ur.x, ur.y, ur.w, ur.h); - ctx = ENFN->context_new(ENDT); + ctx = ENFN->context_new(ENC); clean_them |= evas_render_updates_internal_loop(eo_e, e, pseudo_canvas, ctx, snap, ur.x, ur.y, ur.w, ur.h, @@ -3338,7 +3345,7 @@ evas_render_updates_internal(Evas *eo_e, fx, fy, skip_cutouts, &cm, alpha, do_async, &offset, 1); - ENFN->context_free(ENDT, ctx); + ENFN->context_free(ENC, ctx); offset = restore_offset; } @@ -3358,7 +3365,7 @@ evas_render_updates_internal(Evas *eo_e, eina_spinlock_release(&(e->render.lock)); } - ctx = ENFN->context_new(ENDT); + ctx = ENFN->context_new(ENC); clean_them |= evas_render_updates_internal_loop(eo_e, e, surface, ctx, NULL, ux, uy, uw, uh, @@ -3367,13 +3374,13 @@ evas_render_updates_internal(Evas *eo_e, EINA_FALSE, NULL, alpha, do_async, &offset, 0); - ENFN->context_free(ENDT, ctx); + ENFN->context_free(ENC, ctx); eina_evlog("-render_update", eo_e, 0.0, NULL); if (!do_async) { eina_evlog("+render_push", eo_e, 0.0, NULL); - ENFN->output_redraws_next_update_push(ENDT, surface, ux, uy, uw, uh, render_mode); + ENFN->output_redraws_next_update_push(ENC, ENDT, surface, ux, uy, uw, uh, render_mode); eina_evlog("-render_push", eo_e, 0.0, NULL); } } @@ -3398,7 +3405,7 @@ evas_render_updates_internal(Evas *eo_e, _evas_object_image_video_overlay_do(eo_obj); } _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL); - ENFN->output_flush(ENDT, EVAS_RENDER_MODE_SYNC); + ENFN->output_flush(ENC, ENDT, EVAS_RENDER_MODE_SYNC); _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); eina_evlog("-render_output_flush", eo_e, 0.0, NULL); } @@ -3412,7 +3419,7 @@ evas_render_updates_internal(Evas *eo_e, if (!do_async && rendering) { /* clear redraws */ - ENFN->output_redraws_clear(ENDT); + ENFN->output_redraws_clear(ENC, ENDT); } eina_evlog("-render_clear", eo_e, 0.0, NULL); @@ -3622,7 +3629,7 @@ evas_render_wakeup(Evas *eo_e) } /* clear redraws */ - ENFN->output_redraws_clear(ENDT); + ENFN->output_redraws_clear(ENC, ENDT); /* unref queues */ eina_array_foreach(&evas->scie_unref_queue, _drop_scie_ref, NULL); @@ -3678,6 +3685,7 @@ evas_render_async_wakeup(void *target, Evas_Callback_Type type EINA_UNUSED, void _evas_render_busy_end(); } +// FIXME: This event should be per output... maybe ? maybe not ? static void evas_render_pipe_wakeup(void *data) { @@ -3691,15 +3699,15 @@ evas_render_pipe_wakeup(void *data) { eina_evlog("+render_push", evas->evas, 0.0, NULL); ENFN->output_redraws_next_update_push - (ENDT, ru->surface, ru->area->x, ru->area->y, ru->area->w, ru->area->h, - EVAS_RENDER_MODE_ASYNC_END); + (ENC, ENDT, ru->surface, ru->area->x, ru->area->y, ru->area->w, ru->area->h, + EVAS_RENDER_MODE_ASYNC_END); eina_evlog("-render_push", evas->evas, 0.0, NULL); //XXX: need a way to unref render output surfaces ru->surface = NULL; } eina_evlog("+render_output_flush", evas->evas, 0.0, NULL); eina_spinlock_release(&(evas->render.lock)); - ENFN->output_flush(ENDT, EVAS_RENDER_MODE_ASYNC_END); + ENFN->output_flush(ENC, ENDT, EVAS_RENDER_MODE_ASYNC_END); eina_evlog("-render_output_flush", evas->evas, 0.0, NULL); evas_async_events_put(data, 0, NULL, evas_render_async_wakeup); eina_evlog("-render_pipe_wakeup", evas->evas, 0.0, NULL); @@ -3851,7 +3859,7 @@ _evas_canvas_render_idle_flush(Eo *eo_e, Evas_Public_Data *evas) EINA_LIST_FOREACH(evas->outputs, l, output) if (output->output) - ENFN->output_idle_flush(output->output); + ENFN->output_idle_flush(ENC, output->output); } eina_inarray_flush(&evas->active_objects); @@ -3955,7 +3963,7 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *evas) EINA_LIST_FOREACH(evas->outputs, l, output) if (output->output) - ENFN->output_dump(output->output); + ENFN->output_dump(ENC, output->output); } #define GC_ALL(Cow) \ @@ -3975,7 +3983,7 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *evas) EINA_LIST_FOREACH(evas->outputs, l, output) if (output->output) - ENFN->output_idle_flush(output->output); + ENFN->output_idle_flush(ENC, output->output); } eina_inarray_flush(&evas->active_objects); diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c index b482740ccf..0dc50aaf9c 100644 --- a/src/lib/evas/filters/evas_filter.c +++ b/src/lib/evas/filters/evas_filter.c @@ -189,11 +189,11 @@ _evas_filter_context_program_reuse(Evas_Filter_Context *ctx) surface = evas_ector_buffer_render_image_get(fb->buffer); if (!surface) continue; - dc = ENFN->context_new(ENDT); - ENFN->context_color_set(ENDT, dc, 0, 0, 0, 0); - ENFN->context_render_op_set(ENDT, dc, EVAS_RENDER_COPY); - ENFN->rectangle_draw(ENDT, dc, surface, 0, 0, fb->w, fb->h, ctx->async); - ENFN->context_free(ENDT, dc); + dc = ENFN->context_new(ENC); + ENFN->context_color_set(ENC, dc, 0, 0, 0, 0); + ENFN->context_render_op_set(ENC, dc, EVAS_RENDER_COPY); + ENFN->rectangle_draw(ENC, ENDT, dc, surface, 0, 0, fb->w, fb->h, ctx->async); + ENFN->context_free(ENC, dc); fb->dirty = EINA_FALSE; evas_ector_buffer_engine_image_release(fb->buffer, surface); @@ -1582,7 +1582,7 @@ _filter_target_render(Evas_Filter_Context *ctx) EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->target.surface, EINA_FALSE); - drawctx = ENFN->context_new(ENDT); + drawctx = ENFN->context_new(ENC); surface = ctx->target.surface; src = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID); @@ -1595,39 +1595,39 @@ _filter_target_render(Evas_Filter_Context *ctx) if (ctx->target.clip_use) { - ENFN->context_clip_set(ENDT, drawctx, ctx->target.cx, ctx->target.cy, + ENFN->context_clip_set(ENC, drawctx, ctx->target.cx, ctx->target.cy, ctx->target.cw, ctx->target.ch); } if (ctx->target.color_use) { - ENFN->context_multiplier_set(ENDT, drawctx, + ENFN->context_multiplier_set(ENC, drawctx, ctx->target.r, ctx->target.g, ctx->target.b, ctx->target.a); } if (ctx->target.mask) { - ENFN->context_clip_image_set(ENDT, drawctx, ctx->target.mask, + ENFN->context_clip_image_set(ENC, drawctx, ctx->target.mask, ctx->target.mask_x, ctx->target.mask_y, ctx->evas, EINA_FALSE); } - ENFN->context_render_op_set(ENDT, drawctx, ctx->target.rop); + ENFN->context_render_op_set(ENC, drawctx, ctx->target.rop); if (ctx->target.map) { - ENFN->image_map_draw(ENDT, drawctx, surface, image, + ENFN->image_map_draw(ENC, ENDT, drawctx, surface, image, ctx->target.map, EINA_TRUE, 0, EINA_FALSE); } else { - ENFN->image_draw(ENDT, drawctx, surface, image, + ENFN->image_draw(ENC, ENDT, drawctx, surface, image, 0, 0, src->w, src->h, ctx->target.x, ctx->target.y, src->w, src->h, EINA_TRUE, EINA_FALSE); } - ENFN->context_free(ENDT, drawctx); + ENFN->context_free(ENC, drawctx); evas_ector_buffer_engine_image_release(src->buffer, image); ENFN->image_free(ENC, surface); @@ -1646,7 +1646,8 @@ fail: /* Font drawing stuff */ Eina_Bool -evas_filter_font_draw(Evas_Filter_Context *ctx, void *draw_context, int bufid, +evas_filter_font_draw(Evas_Filter_Context *ctx, + void *engine, void *output, void *draw_context, int bufid, Evas_Font_Set *font, int x, int y, Evas_Text_Props *text_props, Eina_Bool do_async) { @@ -1661,7 +1662,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(ENC, draw_context, surface, + async_unref = ENFN->font_draw(engine, output, draw_context, surface, font, x, y, fb->w, fb->h, fb->w, fb->h, text_props, do_async); if (do_async && async_unref) diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h index 3c1ae718ce..c4da4e75c3 100644 --- a/src/lib/evas/include/evas_filter.h +++ b/src/lib/evas/include/evas_filter.h @@ -165,7 +165,7 @@ Eina_Bool evas_filter_buffer_backing_set(Evas_Filter_Context *ctx Eina_Bool evas_filter_context_run(Evas_Filter_Context *ctx); -Eina_Bool evas_filter_font_draw(Evas_Filter_Context *ctx, void *draw_context, int bufid, Evas_Font_Set *font, int x, int y, Evas_Text_Props *text_props, Eina_Bool do_async); +Eina_Bool evas_filter_font_draw(Evas_Filter_Context *ctx, void *engine, void *output, void *draw_context, int bufid, Evas_Font_Set *font, int x, int y, Evas_Text_Props *text_props, Eina_Bool do_async); Eina_Bool evas_filter_target_set(Evas_Filter_Context *ctx, void *draw_context, void *surface, int x, int y, const RGBA_Map *map); // utility function diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index d2ef118882..9ee190d1fe 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1304,7 +1304,8 @@ struct _Evas_Object_Func { void (*free) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); void (*render) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data, - void *output, void *context, void *surface, int x, int y, Eina_Bool do_async); + void *engine, void *output, void *context, void *surface, + int x, int y, Eina_Bool do_async); void (*render_pre) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); void (*render_post) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data); @@ -1354,227 +1355,225 @@ struct _Evas_Func { void *(*info) (Evas *e); void (*info_free) (Evas *e, void *info); - void *(*setup) (void *info, unsigned int w, unsigned int h); - int (*update) (void *data, void *info, unsigned int w, unsigned int h); + 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); - void (*output_free) (void *data); - void (*output_resize) (void *data, int w, int h); - void (*output_tile_size_set) (void *data, int w, int h); - void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h); - void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h); - void (*output_redraws_clear) (void *data); - void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); - void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h, Evas_Render_Mode render_mode); - void (*output_flush) (void *data, Evas_Render_Mode render_mode); - void (*output_idle_flush) (void *data); - void (*output_dump) (void *data); + void (*output_free) (void *engine, void *data); + void (*output_resize) (void *engine, void *data, int w, int h); + void (*output_tile_size_set) (void *engine, void *data, int w, int h); + void (*output_redraws_rect_add) (void *engine, void *data, int x, int y, int w, int h); + void (*output_redraws_rect_del) (void *engine, void *data, int x, int y, int w, int h); + void (*output_redraws_clear) (void *engine, void *data); + void *(*output_redraws_next_update_get) (void *engine, void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); + void (*output_redraws_next_update_push) (void *engine, void *data, void *surface, int x, int y, int w, int h, Evas_Render_Mode render_mode); + void (*output_flush) (void *engine, void *data, Evas_Render_Mode render_mode); + void (*output_idle_flush) (void *engine, void *data); + void (*output_dump) (void *engine, void *data); - void *(*context_new) (void *data); - void *(*context_dup) (void *data, void *context); - Eina_Bool (*canvas_alpha_get) (void *data); - void (*context_free) (void *data, void *context); - void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h); - void (*context_clip_image_set) (void *data, void *context, void *surface, int x, int y, Evas_Public_Data *evas, Eina_Bool do_async); - void (*context_clip_image_unset) (void *data, void *context); - void (*context_clip_image_get) (void *data, void *context, void **surface, int *x, int *y); /* incref surface if not NULL */ - void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h); - void (*context_clip_unset) (void *data, void *context); - int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h); - void (*context_color_set) (void *data, void *context, int r, int g, int b, int a); - int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a); - void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a); - void (*context_multiplier_unset) (void *data, void *context); - int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a); - void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h); - void (*context_cutout_clear) (void *data, void *context); - void (*context_cutout_target) (void *data, void *context, int x, int y, int w, int h); - void (*context_anti_alias_set) (void *data, void *context, unsigned char aa); - unsigned char (*context_anti_alias_get) (void *data, void *context); - void (*context_color_interpolation_set) (void *data, void *context, int color_space); - int (*context_color_interpolation_get) (void *data, void *context); - void (*context_render_op_set) (void *data, void *context, int render_op); - int (*context_render_op_get) (void *data, void *context); + void *(*context_new) (void *engine); + void *(*context_dup) (void *engine, void *context); + Eina_Bool (*canvas_alpha_get) (void *engine); + void (*context_free) (void *engine, void *context); + void (*context_clip_set) (void *engine, void *context, int x, int y, int w, int h); + void (*context_clip_image_set) (void *engine, void *context, void *surface, int x, int y, Evas_Public_Data *evas, Eina_Bool do_async); + void (*context_clip_image_unset) (void *engine, void *context); + void (*context_clip_image_get) (void *engine, void *context, void **surface, int *x, int *y); /* incref surface if not NULL */ + void (*context_clip_clip) (void *engine, void *context, int x, int y, int w, int h); + void (*context_clip_unset) (void *engine, void *context); + int (*context_clip_get) (void *engine, void *context, int *x, int *y, int *w, int *h); + void (*context_color_set) (void *engine, void *context, int r, int g, int b, int a); + int (*context_color_get) (void *engine, void *context, int *r, int *g, int *b, int *a); + void (*context_multiplier_set) (void *engine, void *context, int r, int g, int b, int a); + void (*context_multiplier_unset) (void *engine, void *context); + int (*context_multiplier_get) (void *engine, void *context, int *r, int *g, int *b, int *a); + void (*context_cutout_add) (void *engine, void *context, int x, int y, int w, int h); + void (*context_cutout_clear) (void *engine, void *context); + void (*context_cutout_target) (void *engine, void *context, int x, int y, int w, int h); + void (*context_anti_alias_set) (void *engine, void *context, unsigned char aa); + unsigned char (*context_anti_alias_get) (void *engine, void *context); + void (*context_color_interpolation_set) (void *engine, void *context, int color_space); + int (*context_color_interpolation_get) (void *engine, void *context); + void (*context_render_op_set) (void *engine, void *context, int render_op); + int (*context_render_op_get) (void *engine, void *context); - void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h, Eina_Bool do_async); + void (*rectangle_draw) (void *engine, void *data, void *context, void *surface, int x, int y, int w, int h, Eina_Bool do_async); - void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2, Eina_Bool do_async); + void (*line_draw) (void *engine, void *data, void *context, void *surface, int x1, int y1, int x2, int y2, Eina_Bool do_async); - void *(*polygon_point_add) (void *data, void *polygon, int x, int y); - void *(*polygon_points_clear) (void *data, void *polygon); - void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y, Eina_Bool do_async); + void *(*polygon_point_add) (void *engine, void *polygon, int x, int y); + void *(*polygon_points_clear) (void *engine, void *polygon); + void (*polygon_draw) (void *engine, void *data, void *context, void *surface, void *polygon, int x, int y, Eina_Bool do_async); - void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo); - void *(*image_mmap) (void *data, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo); - void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace); - void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace); - void (*image_free) (void *data, void *image); - void *(*image_ref) (void *data, void *image); - void (*image_size_get) (void *data, void *image, int *w, int *h); - void *(*image_size_set) (void *data, void *image, int w, int h); - void (*image_stride_get) (void *data, void *image, int *stride); - void *(*image_dirty_region) (void *data, void *image, int x, int y, int w, int h); - void *(*image_data_get) (void *data, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree); - void *(*image_data_put) (void *data, void *image, DATA32 *image_data); - Eina_Bool (*image_data_direct_get) (void *data, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load); - void (*image_data_preload_request) (void *data, void *image, const Eo *target); - void (*image_data_preload_cancel) (void *data, void *image, const Eo *target); - void *(*image_alpha_set) (void *data, void *image, int has_alpha); - int (*image_alpha_get) (void *data, void *image); - void *(*image_orient_set) (void *data, void *image, Evas_Image_Orient orient); - Evas_Image_Orient (*image_orient_get) (void *data, void *image); - Eina_Bool (*image_draw) (void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async); - void (*image_colorspace_set) (void *data, void *image, Evas_Colorspace cspace); - Evas_Colorspace (*image_colorspace_get) (void *data, void *image); - Evas_Colorspace (*image_file_colorspace_get)(void *data, void *image); - Eina_Bool (*image_can_region_get) (void *data, void *image); + void *(*image_load) (void *engine, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo); + void *(*image_mmap) (void *engine, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo); + void *(*image_new_from_data) (void *engine, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace); + void *(*image_new_from_copied_data) (void *engine, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace); + void (*image_free) (void *engine, void *image); + void *(*image_ref) (void *engine, void *image); + void (*image_size_get) (void *engine, void *image, int *w, int *h); + void *(*image_size_set) (void *engine, void *image, int w, int h); + void (*image_stride_get) (void *engine, void *image, int *stride); + void *(*image_dirty_region) (void *engine, void *image, int x, int y, int w, int h); + void *(*image_data_get) (void *engine, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree); + void *(*image_data_put) (void *engine, void *image, DATA32 *image_data); + Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load); + void (*image_data_preload_request) (void *engine, void *image, const Eo *target); + void (*image_data_preload_cancel) (void *engine, void *image, const Eo *target); + void *(*image_alpha_set) (void *engine, void *image, int has_alpha); + int (*image_alpha_get) (void *engine, void *image); + void *(*image_orient_set) (void *engine, void *image, Evas_Image_Orient orient); + Evas_Image_Orient (*image_orient_get) (void *engine, void *image); + Eina_Bool (*image_draw) (void *engine, void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async); + void (*image_colorspace_set) (void *engine, void *image, Evas_Colorspace cspace); + Evas_Colorspace (*image_colorspace_get) (void *engine, void *image); + Evas_Colorspace (*image_file_colorspace_get)(void *engine, void *image); + Eina_Bool (*image_can_region_get) (void *engine, void *image); /* image data map/unmap: direct or indirect access to pixels data */ - Eina_Bool (*image_data_map) (void *data, void **image, Eina_Rw_Slice *slice, int *stride, int x, int y, int w, int h, Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode, int plane); - Eina_Bool (*image_data_unmap) (void *data, void *image, const Eina_Rw_Slice *slice); - int (*image_data_maps_get) (void *data, const void *image, const Eina_Rw_Slice **slices); + Eina_Bool (*image_data_map) (void *engine, void **image, Eina_Rw_Slice *slice, int *stride, int x, int y, int w, int h, Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode, int plane); + Eina_Bool (*image_data_unmap) (void *engine, void *image, const Eina_Rw_Slice *slice); + int (*image_data_maps_get) (void *engine, const void *image, const Eina_Rw_Slice **slices); /* new api for direct data set (not put) */ - void *(*image_data_slice_add) (void *data, void *image, const Eina_Slice *slice, Eina_Bool copy, int w, int h, int stride, Evas_Colorspace space, int plane, Eina_Bool alpha); + void *(*image_data_slice_add) (void *engine, void *image, const Eina_Slice *slice, Eina_Bool copy, int w, int h, int stride, Evas_Colorspace space, int plane, Eina_Bool alpha); - void (*image_prepare) (void *data, void *image); + void (*image_prepare) (void *engine, void *image); - void *(*image_surface_noscale_new) (void *data, int w, int h, int alpha); - void (*image_surface_noscale_region_get)(void *data, void *image, int *x, int *y, int *w, int *h); + void *(*image_surface_noscale_new) (void *engine, int w, int h, int alpha); + void (*image_surface_noscale_region_get)(void *engine, void *image, int *x, int *y, int *w, int *h); - int (*image_native_init) (void *data, Evas_Native_Surface_Type type); - void (*image_native_shutdown) (void *data, Evas_Native_Surface_Type type); - void *(*image_native_set) (void *data, void *image, void *native); - void *(*image_native_get) (void *data, void *image); + int (*image_native_init) (void *engine, Evas_Native_Surface_Type type); + void (*image_native_shutdown) (void *engine, Evas_Native_Surface_Type type); + void *(*image_native_set) (void *engine, void *image, void *native); + void *(*image_native_get) (void *engine, void *image); - void (*image_cache_flush) (void *data); - void (*image_cache_set) (void *data, int bytes); - int (*image_cache_get) (void *data); + void (*image_cache_flush) (void *engine); + void (*image_cache_set) (void *engine, int bytes); + int (*image_cache_get) (void *engine); - Evas_Font_Set *(*font_load) (void *data, const char *name, int size, Font_Rend_Flags wanted_rend); - Evas_Font_Set *(*font_memory_load) (void *data, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); - Evas_Font_Set *(*font_add) (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend); - Evas_Font_Set *(*font_memory_add) (void *data, Evas_Font_Set *font, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); - void (*font_free) (void *data, Evas_Font_Set *font); - int (*font_ascent_get) (void *data, Evas_Font_Set *font); - int (*font_descent_get) (void *data, Evas_Font_Set *font); - int (*font_max_ascent_get) (void *data, Evas_Font_Set *font); - int (*font_max_descent_get) (void *data, Evas_Font_Set *font); - void (*font_string_size_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h); - int (*font_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props); - int (*font_h_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props); - int (*font_v_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props); - int (*font_char_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); - int (*font_char_at_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); - Eina_Bool (*font_draw) (void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Text_Props *intl_props, Eina_Bool do_async); - void (*font_cache_flush) (void *data); - void (*font_cache_set) (void *data, int bytes); - int (*font_cache_get) (void *data); + Evas_Font_Set *(*font_load) (void *engine, const char *name, int size, Font_Rend_Flags wanted_rend); + Evas_Font_Set *(*font_memory_load) (void *engine, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); + Evas_Font_Set *(*font_add) (void *engine, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend); + Evas_Font_Set *(*font_memory_add) (void *engine, Evas_Font_Set *font, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); + void (*font_free) (void *engine, Evas_Font_Set *font); + int (*font_ascent_get) (void *engine, Evas_Font_Set *font); + int (*font_descent_get) (void *engine, Evas_Font_Set *font); + int (*font_max_ascent_get) (void *engine, Evas_Font_Set *font); + int (*font_max_descent_get) (void *engine, Evas_Font_Set *font); + void (*font_string_size_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h); + int (*font_inset_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *text_props); + int (*font_h_advance_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props); + int (*font_v_advance_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props); + int (*font_char_coords_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); + int (*font_char_at_coords_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); + Eina_Bool (*font_draw) (void *engine, void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Text_Props *intl_props, Eina_Bool do_async); + void (*font_cache_flush) (void *engine); + void (*font_cache_set) (void *engine, int bytes); + int (*font_cache_get) (void *engine); /* Engine functions will over time expand from here */ - void (*font_hinting_set) (void *data, Evas_Font_Set *font, int hinting); - int (*font_hinting_can_hint) (void *data, int hinting); + void (*font_hinting_set) (void *engine, Evas_Font_Set *font, int hinting); + int (*font_hinting_can_hint) (void *engine, int hinting); -/* void (*image_rotation_set) (void *data, void *image); */ + void (*image_scale_hint_set) (void *engine, void *image, int hint); + int (*image_scale_hint_get) (void *engine, void *image); + int (*font_last_up_to_pos) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int width_offset); - void (*image_scale_hint_set) (void *data, void *image, int hint); - int (*image_scale_hint_get) (void *data, void *image); - int (*font_last_up_to_pos) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int width_offset); + Eina_Bool (*image_map_draw) (void *engine, void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async); + void *(*image_map_surface_new) (void *engine, int w, int h, int alpha); + void (*image_map_clean) (void *engine, RGBA_Map *m); + void *(*image_scaled_update) (void *engine, void *scaled, void *image, int dst_w, int dst_h, Eina_Bool smooth, Evas_Colorspace cspace); - Eina_Bool (*image_map_draw) (void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async); - void *(*image_map_surface_new) (void *data, int w, int h, int alpha); - void (*image_map_clean) (void *data, RGBA_Map *m); - void *(*image_scaled_update) (void *data, void *scaled, void *image, int dst_w, int dst_h, Eina_Bool smooth, Evas_Colorspace cspace); - - void (*image_content_hint_set) (void *data, void *surface, int hint); - int (*image_content_hint_get) (void *data, void *surface); - int (*font_pen_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); - Eina_Bool (*font_text_props_info_create) (void *data, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len, Evas_Text_Props_Mode mode, const char *lang); - int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props); + void (*image_content_hint_set) (void *engine, void *surface, int hint); + int (*image_content_hint_get) (void *engine, void *surface); + int (*font_pen_coords_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); + Eina_Bool (*font_text_props_info_create) (void *engine, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len, Evas_Text_Props_Mode mode, const char *lang); + int (*font_right_inset_get) (void *engine, Evas_Font_Set *font, const Evas_Text_Props *text_props); /* EFL-GL Glue Layer */ - void *(*gl_surface_create) (void *data, void *config, int w, int h); - void *(*gl_pbuffer_surface_create) (void *data, void *config, int w, int h, int const *attrib_list); - int (*gl_surface_destroy) (void *data, void *surface); - void *(*gl_context_create) (void *data, void *share_context, int version, void *(*native_context_get)(void *ctx), void *(*engine_data_get)(void *evasgl)); - int (*gl_context_destroy) (void *data, void *context); - int (*gl_make_current) (void *data, void *surface, void *context); - const char *(*gl_string_query) (void *data, int name); - void *(*gl_proc_address_get) (void *data, const char *name); - int (*gl_native_surface_get) (void *data, void *surface, void *native_surface); - void *(*gl_api_get) (void *data, int version); - void (*gl_direct_override_get) (void *data, Eina_Bool *override, Eina_Bool *force_off); - void (*gl_get_pixels_set) (void *data, void *get_pixels, void *get_pixels_data, void *obj); - Eina_Bool (*gl_surface_lock) (void *data, void *surface); - Eina_Bool (*gl_surface_read_pixels) (void *data, void *surface, int x, int y, int w, int h, Evas_Colorspace cspace, void *pixels); - Eina_Bool (*gl_surface_unlock) (void *data, void *surface); - int (*gl_error_get) (void *data); - void *(*gl_current_context_get) (void *data); - void *(*gl_current_surface_get) (void *data); - int (*gl_rotation_angle_get) (void *data); - Eina_Bool (*gl_surface_query) (void *data, void *surface, int attr, void *value); - Eina_Bool (*gl_surface_direct_renderable_get) (void *data, Evas_Native_Surface *ns, Eina_Bool *override, void *surface); - void (*gl_image_direct_set) (void *data, void *image, Eina_Bool direct); - int (*gl_image_direct_get) (void *data, void *image); - void (*gl_get_pixels_pre) (void *data); - void (*gl_get_pixels_post) (void *data); + void *(*gl_surface_create) (void *engine, void *config, int w, int h); + void *(*gl_pbuffer_surface_create) (void *engine, void *config, int w, int h, int const *attrib_list); + int (*gl_surface_destroy) (void *engine, void *surface); + void *(*gl_context_create) (void *engine, void *share_context, int version, void *(*native_context_get)(void *ctx), void *(*engine_data_get)(void *evasgl)); + int (*gl_context_destroy) (void *engine, void *context); + int (*gl_make_current) (void *engine, void *surface, void *context); + const char *(*gl_string_query) (void *engine, int name); + void *(*gl_proc_address_get) (void *engine, const char *name); + int (*gl_native_surface_get) (void *engine, void *surface, void *native_surface); + void *(*gl_api_get) (void *engine, int version); + void (*gl_direct_override_get) (void *engine, Eina_Bool *override, Eina_Bool *force_off); + void (*gl_get_pixels_set) (void *engine, void *get_pixels, void *get_pixels_data, void *obj); + Eina_Bool (*gl_surface_lock) (void *engine, void *surface); + Eina_Bool (*gl_surface_read_pixels) (void *engine, void *surface, int x, int y, int w, int h, Evas_Colorspace cspace, void *pixels); + Eina_Bool (*gl_surface_unlock) (void *engine, void *surface); + int (*gl_error_get) (void *engine); + void *(*gl_current_context_get) (void *engine); + void *(*gl_current_surface_get) (void *engine); + int (*gl_rotation_angle_get) (void *engine); + Eina_Bool (*gl_surface_query) (void *engine, void *surface, int attr, void *value); + Eina_Bool (*gl_surface_direct_renderable_get) (void *engine, Evas_Native_Surface *ns, Eina_Bool *override, void *surface); + void (*gl_image_direct_set) (void *engine, void *image, Eina_Bool direct); + int (*gl_image_direct_get) (void *engine, void *image); + void (*gl_get_pixels_pre) (void *engine); + void (*gl_get_pixels_post) (void *engine); - int (*image_load_error_get) (void *data, void *image); - int (*font_run_end_get) (void *data, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len); + int (*image_load_error_get) (void *engine, void *image); + int (*font_run_end_get) (void *engine, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len); /* animated feature */ - Eina_Bool (*image_animated_get) (void *data, void *image); - int (*image_animated_frame_count_get) (void *data, void *image); - Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image); - int (*image_animated_loop_count_get) (void *data, void *image); - double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num); - Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index); + Eina_Bool (*image_animated_get) (void *engine, void *image); + int (*image_animated_frame_count_get) (void *engine, void *image); + Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *engine, void *image); + int (*image_animated_loop_count_get) (void *engine, void *image); + double (*image_animated_frame_duration_get) (void *engine, void *image, int start_frame, int frame_num); + Eina_Bool (*image_animated_frame_set) (void *engine, void *image, int frame_index); /* max size query */ - void (*image_max_size_get) (void *data, int *maxw, int *maxh); + void (*image_max_size_get) (void *engine, int *maxw, int *maxh); /* multiple font draws */ - Eina_Bool (*multi_font_draw) (void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Font_Array *texts, Eina_Bool do_async); + Eina_Bool (*multi_font_draw) (void *engine, void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Font_Array *texts, Eina_Bool do_async); Eina_Bool (*pixel_alpha_get) (void *image, int x, int y, DATA8 *alpha, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); - void (*context_flush) (void *data); + void (*context_flush) (void *engine); /* 3D features */ - void *(*drawable_new) (void *data, int w, int h, int alpha); - void (*drawable_free) (void *data, void *drawable); - void (*drawable_size_get) (void *data, void *drawable, int *w, int *h); - void *(*image_drawable_set) (void *data, void *image, void *drawable); + void *(*drawable_new) (void *engine, int w, int h, int alpha); + void (*drawable_free) (void *engine, void *drawable); + void (*drawable_size_get) (void *engine, void *drawable, int *w, int *h); + void *(*image_drawable_set) (void *engine, void *image, void *drawable); void (*drawable_texture_rendered_pixels_get) (unsigned int tex, int x, int y, int w, int h, void *drawable EINA_UNUSED, void *data); - void (*drawable_scene_render) (void *data, void *drawable, void *scene_data); - Eina_Bool (*drawable_scene_render_to_texture) (void *data, void *drawable, void *scene_data); + void (*drawable_scene_render) (void *engine, void *data, void *drawable, void *scene_data); + Eina_Bool (*drawable_scene_render_to_texture) (void *engine, void *drawable, void *scene_data); int (*drawable_texture_color_pick_id_get) (void *drawable); int (*drawable_texture_target_id_get) (void *drawable); void (*drawable_texture_pixel_color_get) (unsigned int tex EINA_UNUSED, int x, int y, Evas_Color *color, void *drawable); - void *(*texture_new) (void *data, Eina_Bool use_atlas); - void (*texture_free) (void *data, void *texture); - void (*texture_size_get) (void *data, void *texture, int *w, int *h); - void (*texture_wrap_set) (void *data, void *texture, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t); - void (*texture_wrap_get) (void *data, void *texture, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t); - void (*texture_filter_set) (void *data, void *texture, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag); - void (*texture_filter_get) (void *data, void *texture, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag); - void (*texture_image_set) (void *data, void *texture, void *image); - void *(*texture_image_get) (void *data, void *texture); + void *(*texture_new) (void *engine, Eina_Bool use_atlas); + void (*texture_free) (void *engine, void *texture); + void (*texture_size_get) (void *engine, void *texture, int *w, int *h); + void (*texture_wrap_set) (void *engine, void *texture, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t); + void (*texture_wrap_get) (void *engine, void *texture, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t); + void (*texture_filter_set) (void *engine, void *texture, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag); + void (*texture_filter_get) (void *engine, void *texture, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag); + void (*texture_image_set) (void *engine, void *texture, void *image); + void *(*texture_image_get) (void *engine, void *texture); 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); - void (*ector_begin) (void *data, void *context, Ector_Surface *ector, void *surface, void *engine_data, int x, int y, Eina_Bool do_async); - void (*ector_renderer_draw) (void *data, void *context, void *surface, void *engine_data, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async); - void (*ector_end) (void *data, void *context, Ector_Surface *ector, void *surface, void *engine_data, Eina_Bool do_async); - void* (*ector_new) (void *data, void *context, Ector_Surface *ector, void *surface); + void (*ector_destroy) (void *engine, Ector_Surface *surface); + Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image); + Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags); + void (*ector_begin) (void *engine, void *context, Ector_Surface *ector, void *surface, void *engine_data, int x, int y, Eina_Bool do_async); + void (*ector_renderer_draw) (void *engine, void *data, void *context, void *surface, void *engine_data, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async); + void (*ector_end) (void *engine, void *context, Ector_Surface *ector, void *surface, void *engine_data, Eina_Bool do_async); + void* (*ector_new) (void *engine, void *context, Ector_Surface *ector, void *surface); void (*ector_free) (void *engine_data); - Evas_Filter_Support (*gfx_filter_supports) (void *data, Evas_Filter_Command *cmd); - Eina_Bool (*gfx_filter_process) (void *data, Evas_Filter_Command *cmd); + Evas_Filter_Support (*gfx_filter_supports) (void *engine, Evas_Filter_Command *cmd); + Eina_Bool (*gfx_filter_process) (void *engine, Evas_Filter_Command *cmd); }; struct _Evas_Image_Save_Func @@ -1737,11 +1736,11 @@ void evas_unref_queue_texts_put(Evas_Public_Data *pd, void *glyph); void evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data); void evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj, - void *data, void *context, void *surface, + void *engine, void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async); void evas_font_draw_async_check(Evas_Object_Protected_Data *obj, - void *data, void *context, void *surface, + void *engine, void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Text_Props *intl_props, Eina_Bool do_async); @@ -1926,7 +1925,7 @@ void evas_model_set_from_surface_primitive(Evas_Canvas3D_Mesh *mesh, int frame, void evas_model_set_from_terrain_primitive(Evas_Canvas3D_Mesh *mesh, int frame, int precision, Eina_Vector2 tex_scale); /* Filter functions */ -Eina_Bool evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async, Eina_Bool alpha); +Eina_Bool evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj, void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async, Eina_Bool alpha); extern int _evas_alloc_error; extern int _evas_event_counter; diff --git a/src/modules/evas/engines/buffer/evas_engine.c b/src/modules/evas/engines/buffer/evas_engine.c index 5d2efdf8bd..dc577e9d36 100644 --- a/src/modules/evas/engines/buffer/evas_engine.c +++ b/src/modules/evas/engines/buffer/evas_engine.c @@ -29,7 +29,7 @@ static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_ static void *eng_info(Evas *eo_e EINA_UNUSED); static void eng_info_free(Evas *eo_e EINA_UNUSED, void *info); -static void eng_output_free(void *data); +static void eng_output_free(void *engine EINA_UNUSED, void *data); /* internal engine routines */ static void * @@ -132,7 +132,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Buffer *info = in; @@ -153,7 +153,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; diff --git a/src/modules/evas/engines/drm/evas_engine.c b/src/modules/evas/engines/drm/evas_engine.c index 810faa767b..c66578282e 100644 --- a/src/modules/evas/engines/drm/evas_engine.c +++ b/src/modules/evas/engines/drm/evas_engine.c @@ -73,7 +73,7 @@ eng_info_free(Evas *evas EINA_UNUSED, void *einfo) } static void * -eng_setup(void *einfo, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *einfo, unsigned int w, unsigned int h) { Evas_Engine_Info_Drm *info = einfo; @@ -81,7 +81,7 @@ eng_setup(void *einfo, unsigned int w, unsigned int h) } static int -eng_update(void *data, void *einfo, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *einfo, unsigned int w, unsigned int h) { Evas_Engine_Info_Drm *info = einfo; Render_Engine *re = data; @@ -96,7 +96,7 @@ eng_update(void *data, void *einfo, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; diff --git a/src/modules/evas/engines/eglfs/evas_engine.c b/src/modules/evas/engines/eglfs/evas_engine.c index b7fa945360..f84081142f 100644 --- a/src/modules/evas/engines/eglfs/evas_engine.c +++ b/src/modules/evas/engines/eglfs/evas_engine.c @@ -691,7 +691,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *in) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Eglfs *info = in; Render_Engine *re = NULL; @@ -777,7 +777,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static int -eng_update(void *data, void *info, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int w, unsigned int h) { Render_Engine *re = data; @@ -837,7 +837,7 @@ eng_update(void *data, void *info, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -875,7 +875,7 @@ eng_canvas_alpha_get(void *data) } static void -eng_output_dump(void *data) +eng_output_dump(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -889,7 +889,7 @@ eng_output_dump(void *data) } static void * -eng_image_native_set(void *data, void *image, void *native) +eng_image_native_set(void *engine EINA_UNUSED, void *data, void *image, void *native) { Render_Engine *re; Outbuf *ob; diff --git a/src/modules/evas/engines/fb/evas_engine.c b/src/modules/evas/engines/fb/evas_engine.c index e5dbbee701..2f5897e52b 100644 --- a/src/modules/evas/engines/fb/evas_engine.c +++ b/src/modules/evas/engines/fb/evas_engine.c @@ -21,13 +21,6 @@ struct _Render_Engine Render_Engine_Software_Generic generic; }; -/* prototypes we will use here */ -static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh); - -static void *eng_info(Evas *eo_e); -static void eng_info_free(Evas *eo_e, void *info); -static void eng_output_free(void *data); - /* internal engine routines */ static void * _output_setup(int w, int h, int rot, int vt, int dev, int refresh) @@ -93,7 +86,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_FB *info = in; @@ -106,7 +99,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c b/src/modules/evas/engines/gl_cocoa/evas_engine.c index 3e9739bee5..4ae938c6e7 100644 --- a/src/modules/evas/engines/gl_cocoa/evas_engine.c +++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c @@ -149,7 +149,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_GL_Cocoa *const info = in; Render_Engine *re; @@ -217,7 +217,8 @@ err: } static int -eng_update(void *data EINA_UNUSED, +eng_update(void *engine EINA_UNUSED, + void *data EINA_UNUSED, void *info EINA_UNUSED, unsigned int w EINA_UNUSED, unsigned int h EINA_UNUSED) @@ -230,7 +231,7 @@ eng_update(void *data EINA_UNUSED, } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *const re = data; diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c index fca3305686..428b22b064 100644 --- a/src/modules/evas/engines/gl_drm/evas_engine.c +++ b/src/modules/evas/engines/gl_drm/evas_engine.c @@ -815,7 +815,7 @@ _eng_merge_mode_get(void) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_GL_Drm *info = in; Render_Engine *re = NULL; @@ -903,7 +903,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static int -eng_update(void *data, void *in, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_GL_Drm *info = (Evas_Engine_Info_GL_Drm *)in; Render_Engine *re = data; @@ -965,7 +965,7 @@ eng_update(void *data, void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -1007,7 +1007,7 @@ eng_canvas_alpha_get(void *data) } static void -eng_output_dump(void *data) +eng_output_dump(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -1021,7 +1021,7 @@ eng_output_dump(void *data) } static int -eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_init(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -1035,7 +1035,7 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void -eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_shutdown(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -1049,7 +1049,7 @@ eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void * -eng_image_native_set(void *data, void *image, void *native) +eng_image_native_set(void *engine, void *image, void *native) { Render_Engine *re; Outbuf *ob; @@ -1060,7 +1060,7 @@ eng_image_native_set(void *data, void *image, void *native) uint32_t texid; void *wlid, *wl_buf = NULL; - re = (Render_Engine *)data; + re = (Render_Engine *)engine; if (!re) return NULL; ob = eng_get_ob(re); diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 223a23f797..43866c153d 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -110,7 +110,7 @@ _context_stored_reset(void *data EINA_UNUSED, void *surface) #define CONTEXT_STORED_RESET(data, surface) _context_stored_reset(data, surface) static void -eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h, Eina_Bool do_async EINA_UNUSED) +eng_rectangle_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, int x, int y, int w, int h, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; Render_Engine_GL_Generic *re = data; @@ -123,7 +123,7 @@ eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w } static void -eng_line_draw(void *data, void *context, void *surface, int p1x, int p1y, int p2x, int p2y, Eina_Bool do_async EINA_UNUSED) +eng_line_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, int p1x, int p1y, int p2x, int p2y, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; Render_Engine_GL_Generic *re = data; @@ -136,19 +136,19 @@ eng_line_draw(void *data, void *context, void *surface, int p1x, int p1y, int p2 } static void * -eng_polygon_point_add(void *data EINA_UNUSED, void *polygon, int x, int y) +eng_polygon_point_add(void *engine EINA_UNUSED, void *polygon, int x, int y) { return evas_gl_common_poly_point_add(polygon, x, y); } static void * -eng_polygon_points_clear(void *data EINA_UNUSED, void *polygon) +eng_polygon_points_clear(void *engine EINA_UNUSED, void *polygon) { return evas_gl_common_poly_points_clear(polygon); } static void -eng_polygon_draw(void *data, void *context, void *surface EINA_UNUSED, void *polygon, int x, int y, Eina_Bool do_async EINA_UNUSED) +eng_polygon_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface EINA_UNUSED, void *polygon, int x, int y, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; Render_Engine_GL_Generic *re = data; @@ -161,7 +161,7 @@ eng_polygon_draw(void *data, void *context, void *surface EINA_UNUSED, void *pol } static int -eng_image_alpha_get(void *data EINA_UNUSED, void *image) +eng_image_alpha_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im; @@ -171,7 +171,7 @@ eng_image_alpha_get(void *data EINA_UNUSED, void *image) } static Evas_Colorspace -eng_image_colorspace_get(void *data EINA_UNUSED, void *image) +eng_image_colorspace_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im; @@ -181,9 +181,9 @@ eng_image_colorspace_get(void *data EINA_UNUSED, void *image) } static void * -eng_image_alpha_set(void *data, void *image, int has_alpha) +eng_image_alpha_set(void *engine, void *image, int has_alpha) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im; if (!image) return NULL; @@ -222,8 +222,8 @@ eng_image_alpha_set(void *data, void *image, int has_alpha) im_new = evas_gl_common_image_new_from_copied_data (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data, - eng_image_alpha_get(data, image), - eng_image_colorspace_get(data, image)); + eng_image_alpha_get(engine, image), + eng_image_colorspace_get(engine, image)); if (!im_new) return im; evas_gl_common_image_free(im); im = im_new; @@ -234,7 +234,7 @@ eng_image_alpha_set(void *data, void *image, int has_alpha) } static Evas_Colorspace -eng_image_file_colorspace_get(void *data EINA_UNUSED, void *image) +eng_image_file_colorspace_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im = image; @@ -245,7 +245,7 @@ eng_image_file_colorspace_get(void *data EINA_UNUSED, void *image) } static Eina_Bool -eng_image_data_direct_get(void *data EINA_UNUSED, void *image, int plane, +eng_image_data_direct_get(void *engine EINA_UNUSED, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load) { @@ -264,9 +264,9 @@ eng_image_data_direct_get(void *data EINA_UNUSED, void *image, int plane, } static void -eng_image_colorspace_set(void *data, void *image, Evas_Colorspace cspace) +eng_image_colorspace_set(void *engine, void *image, Evas_Colorspace cspace) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im; if (!image) return; @@ -353,7 +353,7 @@ _native_free_cb(void *image) } static int -eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_init(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -366,7 +366,7 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void -eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_shutdown(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -379,10 +379,10 @@ eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void * -eng_image_native_set(void *data, void *image, void *native) +eng_image_native_set(void *engine, void *image, void *native) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_Native_Surface *ns = native; Evas_GL_Image *im = image, *im2 = NULL; uint32_t texid; @@ -490,7 +490,7 @@ eng_image_native_set(void *data, void *image, void *native) } static void * -eng_image_native_get(void *data EINA_UNUSED, void *image) +eng_image_native_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im = image; Evas_Native_Surface *n; @@ -502,10 +502,10 @@ eng_image_native_get(void *data EINA_UNUSED, void *image) } static void * -eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +eng_image_load(void *engine, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; *error = EVAS_LOAD_ERROR_NONE; re->window_use(re->software.ob); @@ -514,10 +514,10 @@ eng_image_load(void *data, const char *file, const char *key, int *error, Evas_I } static void * -eng_image_mmap(void *data, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo) +eng_image_mmap(void *engine, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; *error = EVAS_LOAD_ERROR_NONE; re->window_use(re->software.ob); @@ -526,10 +526,10 @@ eng_image_mmap(void *data, Eina_File *f, const char *key, int *error, Evas_Image } static void * -eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace) +eng_image_new_from_data(void *engine, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); @@ -537,10 +537,10 @@ eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, } static void * -eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace) +eng_image_new_from_copied_data(void *engine, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); @@ -548,9 +548,9 @@ eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int } void -eng_image_free(void *data, void *image) +eng_image_free(void *engine, void *image) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; if (!image) return; re->window_use(re->software.ob); @@ -558,7 +558,7 @@ eng_image_free(void *data, void *image) } static void * -eng_image_ref(void *data EINA_UNUSED, void *image) +eng_image_ref(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im = image; if (!im) return NULL; @@ -567,7 +567,7 @@ eng_image_ref(void *data EINA_UNUSED, void *image) } static void -eng_image_size_get(void *data EINA_UNUSED, void *image, int *w, int *h) +eng_image_size_get(void *engine EINA_UNUSED, void *image, int *w, int *h) { Evas_GL_Image *im; if (!image) @@ -593,10 +593,10 @@ eng_image_size_get(void *data EINA_UNUSED, void *image, int *w, int *h) } static void * -eng_image_size_set(void *data, void *image, int w, int h) +eng_image_size_set(void *engine, void *image, int w, int h) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im = image; Evas_GL_Image *im_old; @@ -621,7 +621,7 @@ eng_image_size_set(void *data, void *image, int w, int h) } im_old = image; - switch (eng_image_colorspace_get(data, image)) + switch (eng_image_colorspace_get(engine, image)) { case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P709_PL: @@ -639,16 +639,16 @@ eng_image_size_set(void *data, void *image, int w, int h) ((int)im_old->im->cache_entry.h == h)) return image; im = evas_gl_common_image_new(gl_context, w, h, - eng_image_alpha_get(data, image), - eng_image_colorspace_get(data, image)); + eng_image_alpha_get(engine, image), + eng_image_colorspace_get(engine, image)); evas_gl_common_image_free(im_old); return im; } static void * -eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +eng_image_dirty_region(void *engine, void *image, int x, int y, int w, int h) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im = image; if (!image) return NULL; @@ -718,9 +718,9 @@ _rotate_image_data(Render_Engine_GL_Generic *re, Evas_GL_Image *im1) } void * -eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree) +eng_image_data_get(void *engine, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im_new = NULL; Evas_GL_Image *im = image; int error; @@ -818,7 +818,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i return NULL; } - ok = eng_gl_surface_lock(data, im); + ok = eng_gl_surface_lock(engine, im); if (!ok) { if (err) *err = EVAS_LOAD_ERROR_GENERIC; @@ -828,7 +828,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i im_new = evas_gl_common_image_new_from_copied_data (im->gc, im->tex->w, im->tex->h, NULL, - eng_image_alpha_get(data, image), EVAS_COLORSPACE_ARGB8888); + eng_image_alpha_get(engine, image), EVAS_COLORSPACE_ARGB8888); if (!im_new) { if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; @@ -837,9 +837,9 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i } ok = eng_gl_surface_read_pixels - (data, im, 0, 0, im_new->w, im_new->h, + (engine, im, 0, 0, im_new->w, im_new->h, EVAS_COLORSPACE_ARGB8888, im_new->im->image.data); - eng_gl_surface_unlock(data, im); + eng_gl_surface_unlock(engine, im); if (!ok) { if (err) *err = EVAS_LOAD_ERROR_GENERIC; @@ -892,8 +892,8 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i im_new = evas_gl_common_image_new_from_copied_data (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data, - eng_image_alpha_get(data, image), - eng_image_colorspace_get(data, image)); + eng_image_alpha_get(engine, image), + eng_image_colorspace_get(engine, image)); if (!im_new) { if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; @@ -931,7 +931,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i rotate_image: // rotate data for image save - im_new = _rotate_image_data(data, image); + im_new = _rotate_image_data(engine, image); if (!im_new) { if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; @@ -944,9 +944,9 @@ rotate_image: } void * -eng_image_data_put(void *data, void *image, DATA32 *image_data) +eng_image_data_put(void *engine, void *image, DATA32 *image_data) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im, *im2; if (!image) return NULL; @@ -982,9 +982,9 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) return image; } - im2 = eng_image_new_from_data(data, im->w, im->h, image_data, - eng_image_alpha_get(data, image), - eng_image_colorspace_get(data, image)); + im2 = eng_image_new_from_data(engine, im->w, im->h, image_data, + eng_image_alpha_get(engine, image), + eng_image_colorspace_get(engine, image)); if (!im2) return im; evas_gl_common_image_free(im); im = im2; @@ -998,9 +998,9 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) case EVAS_COLORSPACE_GRY8: if ((!im->im) || (image_data != im->im->image.data)) { - im2 = eng_image_new_from_data(data, im->w, im->h, image_data, - eng_image_alpha_get(data, image), - eng_image_colorspace_get(data, image)); + im2 = eng_image_new_from_data(engine, im->w, im->h, image_data, + eng_image_alpha_get(engine, image), + eng_image_colorspace_get(engine, image)); if (!im2) return im; evas_gl_common_image_free(im); im = im2; @@ -1031,9 +1031,9 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) } static void * -eng_image_orient_set(void *data, void *image, Evas_Image_Orient orient) +eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im; Evas_GL_Image *im_new; @@ -1069,7 +1069,7 @@ eng_image_orient_set(void *data, void *image, Evas_Image_Orient orient) } static Evas_Image_Orient -eng_image_orient_get(void *data EINA_UNUSED, void *image) +eng_image_orient_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im; @@ -1079,7 +1079,7 @@ eng_image_orient_get(void *data EINA_UNUSED, void *image) } static void -eng_image_data_preload_request(void *data EINA_UNUSED, void *image, const Eo *target) +eng_image_data_preload_request(void *engine EINA_UNUSED, void *image, const Eo *target) { Evas_GL_Image *gim = image; // Render_Engine_GL_Generic *re = data; @@ -1114,7 +1114,7 @@ eng_image_data_preload_request(void *data EINA_UNUSED, void *image, const Eo *ta } static void -eng_image_data_preload_cancel(void *data EINA_UNUSED, void *image, const Eo *target) +eng_image_data_preload_cancel(void *engine EINA_UNUSED, void *image, const Eo *target) { Evas_GL_Image *gim = image; RGBA_Image *im; @@ -1135,7 +1135,7 @@ eng_image_data_preload_cancel(void *data EINA_UNUSED, void *image, const Eo *tar } static Eina_Bool -eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async EINA_UNUSED) +eng_image_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; Render_Engine_GL_Generic *re = data; @@ -1213,13 +1213,13 @@ eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, } static void -eng_image_scale_hint_set(void *data EINA_UNUSED, void *image, int hint) +eng_image_scale_hint_set(void *engine EINA_UNUSED, void *image, int hint) { if (image) evas_gl_common_image_scale_hint_set(image, hint); } static int -eng_image_scale_hint_get(void *data EINA_UNUSED, void *image) +eng_image_scale_hint_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; if (!gim) return EVAS_IMAGE_SCALE_HINT_NONE; @@ -1227,7 +1227,7 @@ eng_image_scale_hint_get(void *data EINA_UNUSED, void *image) } static Eina_Bool -eng_image_map_draw(void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async) +eng_image_map_draw(void *engine, void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async) { Evas_Engine_GL_Context *gl_context; Evas_GL_Image *gim = image; @@ -1264,7 +1264,7 @@ eng_image_map_draw(void *data, void *context, void *surface, void *image, RGBA_M dy = m->pts[0].y >> FP; dw = (m->pts[2].x >> FP) - dx; dh = (m->pts[2].y >> FP) - dy; - eng_image_draw(data, context, surface, image, + eng_image_draw(engine, data, context, surface, image, 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth, do_async); } else @@ -1277,14 +1277,14 @@ eng_image_map_draw(void *data, void *context, void *surface, void *image, RGBA_M } static void -eng_image_map_clean(void *data EINA_UNUSED, RGBA_Map *m EINA_UNUSED) +eng_image_map_clean(void *engine EINA_UNUSED, RGBA_Map *m EINA_UNUSED) { } static void * -eng_image_map_surface_new(void *data, int w, int h, int alpha) +eng_image_map_surface_new(void *engine, int w, int h, int alpha) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_Engine_GL_Context *gl_context; re->window_use(re->software.ob); @@ -1293,7 +1293,7 @@ eng_image_map_surface_new(void *data, int w, int h, int alpha) } void * -eng_image_scaled_update(void *data EINA_UNUSED, void *scaled, void *image, +eng_image_scaled_update(void *engine EINA_UNUSED, void *scaled, void *image, int dst_w, int dst_h, Eina_Bool smooth, Evas_Colorspace cspace EINA_UNUSED) { @@ -1301,16 +1301,16 @@ eng_image_scaled_update(void *data EINA_UNUSED, void *scaled, void *image, } static void -eng_image_content_hint_set(void *data, void *image, int hint) +eng_image_content_hint_set(void *engine, void *image, int hint) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); evas_gl_common_image_content_hint_set(image, hint); } static int -eng_image_content_hint_get(void *data EINA_UNUSED, void *image) +eng_image_content_hint_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; if (!gim) return EVAS_IMAGE_CONTENT_HINT_NONE; @@ -1318,10 +1318,10 @@ eng_image_content_hint_get(void *data EINA_UNUSED, void *image) } static void -eng_image_cache_flush(void *data) +eng_image_cache_flush(void *engine) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; int tmp_size; re->window_use(re->software.ob); @@ -1336,10 +1336,10 @@ eng_image_cache_flush(void *data) } static void -eng_image_cache_set(void *data, int bytes) +eng_image_cache_set(void *engine, int bytes) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); @@ -1350,15 +1350,15 @@ eng_image_cache_set(void *data, int bytes) } static int -eng_image_cache_get(void *data EINA_UNUSED) +eng_image_cache_get(void *engine EINA_UNUSED) { return evas_common_image_get_cache(); } static void -eng_font_cache_flush(void *data) +eng_font_cache_flush(void *engine) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; int tmp_size; re->window_use(re->software.ob); @@ -1369,25 +1369,25 @@ eng_font_cache_flush(void *data) } static void -eng_font_cache_set(void *data, int bytes) +eng_font_cache_set(void *engine, int bytes) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); evas_common_font_cache_set(bytes); } static int -eng_font_cache_get(void *data) +eng_font_cache_get(void *engine) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); return evas_common_font_cache_get(); } static void -eng_image_stride_get(void *data EINA_UNUSED, void *image, int *stride) +eng_image_stride_get(void *engine EINA_UNUSED, void *image, int *stride) { Evas_GL_Image *im = image; @@ -1438,7 +1438,7 @@ eng_image_stride_get(void *data EINA_UNUSED, void *image, int *stride) } static Eina_Bool -eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font EINA_UNUSED, int x, int y, int w EINA_UNUSED, int h EINA_UNUSED, int ow EINA_UNUSED, int oh EINA_UNUSED, Evas_Text_Props *intl_props, Eina_Bool do_async EINA_UNUSED) +eng_font_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, Evas_Font_Set *font EINA_UNUSED, int x, int y, int w EINA_UNUSED, int h EINA_UNUSED, int ow EINA_UNUSED, int oh EINA_UNUSED, Evas_Text_Props *intl_props, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; Render_Engine_GL_Generic *re = data; @@ -1491,57 +1491,57 @@ evgl_init(Render_Engine_GL_Generic *re) #define EVGLINIT(_re, _ret) if (!evgl_init(_re)) return _ret static void * -eng_gl_surface_create(void *data, void *config, int w, int h) +eng_gl_surface_create(void *engine, void *config, int w, int h) { Evas_GL_Config *cfg = (Evas_GL_Config *)config; - EVGLINIT(data, NULL); - return evgl_surface_create(data, cfg, w, h); + EVGLINIT(engine, NULL); + return evgl_surface_create(engine, cfg, w, h); } static void * -eng_gl_pbuffer_surface_create(void *data, void *config, int w, int h, const int *attrib_list) +eng_gl_pbuffer_surface_create(void *engine, void *config, int w, int h, const int *attrib_list) { Evas_GL_Config *cfg = (Evas_GL_Config *)config; - EVGLINIT(data, NULL); - return evgl_pbuffer_surface_create(data, cfg, w, h, attrib_list); + EVGLINIT(engine, NULL); + return evgl_pbuffer_surface_create(engine, cfg, w, h, attrib_list); } static int -eng_gl_surface_destroy(void *data, void *surface) +eng_gl_surface_destroy(void *engine, void *surface) { EVGL_Surface *sfc = (EVGL_Surface *)surface; - EVGLINIT(data, 0); - CONTEXT_STORED_RESET(data, surface); - return evgl_surface_destroy(data, sfc); + EVGLINIT(engine, 0); + CONTEXT_STORED_RESET(engine, surface); + return evgl_surface_destroy(engine, sfc); } static void * -eng_gl_context_create(void *data, void *share_context, int version, +eng_gl_context_create(void *engine, void *share_context, int version, void *(*native_context_get)(void *), void *(*engine_data_get)(void *)) { EVGL_Context *sctx = (EVGL_Context *)share_context; - EVGLINIT(data, NULL); - return evgl_context_create(data, sctx, version, native_context_get, engine_data_get); + EVGLINIT(engine, NULL); + return evgl_context_create(engine, sctx, version, native_context_get, engine_data_get); } static int -eng_gl_context_destroy(void *data, void *context) +eng_gl_context_destroy(void *engine, void *context) { EVGL_Context *ctx = (EVGL_Context *)context; - EVGLINIT(data, 0); - return evgl_context_destroy(data, ctx); + EVGLINIT(engine, 0); + return evgl_context_destroy(engine, ctx); } static int -eng_gl_make_current(void *data, void *surface, void *context) +eng_gl_make_current(void *engine, void *surface, void *context) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; EVGL_Surface *sfc = (EVGL_Surface *)surface; EVGL_Context *ctx = (EVGL_Context *)context; int ret = 0; @@ -1563,14 +1563,14 @@ eng_gl_make_current(void *data, void *surface, void *context) } } - ret = evgl_make_current(data, sfc, ctx); - CONTEXT_STORE(data, surface, context); + ret = evgl_make_current(engine, sfc, ctx); + CONTEXT_STORE(engine, surface, context); return ret; } static void * -eng_gl_current_surface_get(void *data EINA_UNUSED) +eng_gl_current_surface_get(void *engine EINA_UNUSED) { EVGL_Context *ctx; @@ -1584,24 +1584,24 @@ eng_gl_current_surface_get(void *data EINA_UNUSED) } static int -eng_gl_rotation_angle_get(void *data) +eng_gl_rotation_angle_get(void *engine) { if (!evgl_engine->funcs->rotation_angle_get) return 0; if (!_evgl_direct_enabled()) return 0; - return evgl_engine->funcs->rotation_angle_get(data); + return evgl_engine->funcs->rotation_angle_get(engine); } static const char * -eng_gl_string_query(void *data, int name) +eng_gl_string_query(void *engine, int name) { - EVGLINIT(data, NULL); + EVGLINIT(engine, NULL); return evgl_string_query(name); } static void * -eng_gl_proc_address_get(void *data, const char *name) +eng_gl_proc_address_get(void *engine, const char *name) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; EVGLINIT(re, NULL); void *fun = NULL; @@ -1622,7 +1622,7 @@ eng_gl_proc_address_get(void *data, const char *name) } static int -eng_gl_native_surface_get(void *data EINA_UNUSED, void *surface, void *native_surface) +eng_gl_native_surface_get(void *engine EINA_UNUSED, void *surface, void *native_surface) { EVGL_Surface *sfc = (EVGL_Surface *)surface; Evas_Native_Surface *ns = (Evas_Native_Surface *)native_surface; @@ -1631,9 +1631,9 @@ eng_gl_native_surface_get(void *data EINA_UNUSED, void *surface, void *native_su } static void * -eng_gl_api_get(void *data, int version) +eng_gl_api_get(void *engine, int version) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; void *ret; Evas_Engine_GL_Context *gl_context; EVGLINIT(re, NULL); @@ -1649,7 +1649,7 @@ eng_gl_api_get(void *data, int version) ERR("Version not supported!"); return NULL; } - ret = evgl_api_get(data, version, EINA_TRUE); + ret = evgl_api_get(engine, version, EINA_TRUE); //Disable GLES3 support if symbols not present if ((!ret) && (version == EVAS_GL_GLES_3_X)) @@ -1660,22 +1660,22 @@ eng_gl_api_get(void *data, int version) static void -eng_gl_direct_override_get(void *data, Eina_Bool *override, Eina_Bool *force_off) +eng_gl_direct_override_get(void *engine, Eina_Bool *override, Eina_Bool *force_off) { - EVGLINIT(data, ); + EVGLINIT(engine, ); evgl_direct_override_get(override, force_off); } static Eina_Bool -eng_gl_surface_direct_renderable_get(void *data, Evas_Native_Surface *ns, Eina_Bool *override, void *surface) +eng_gl_surface_direct_renderable_get(void *engine, Evas_Native_Surface *ns, Eina_Bool *override, void *surface) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Eina_Bool direct_render, client_side_rotation; Evas_Engine_GL_Context *gl_context; Evas_GL_Image *sfc = surface; if (!re) return EINA_FALSE; - EVGLINIT(data, EINA_FALSE); + EVGLINIT(engine, EINA_FALSE); if (!ns) return EINA_FALSE; if (!evgl_native_surface_direct_opts_get(ns, &direct_render, &client_side_rotation, override)) return EINA_FALSE; @@ -1694,9 +1694,9 @@ eng_gl_surface_direct_renderable_get(void *data, Evas_Native_Surface *ns, Eina_B } static void -eng_gl_get_pixels_set(void *data, void *get_pixels, void *get_pixels_data, void *obj) +eng_gl_get_pixels_set(void *engine, void *get_pixels, void *get_pixels_data, void *obj) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->func.get_pixels = get_pixels; re->func.get_pixels_data = get_pixels_data; @@ -1704,20 +1704,20 @@ eng_gl_get_pixels_set(void *data, void *get_pixels, void *get_pixels_data, void } static void -eng_gl_get_pixels_pre(void *data) +eng_gl_get_pixels_pre(void *engine) { - EVGLINIT(data, ); + EVGLINIT(engine, ); evgl_get_pixels_pre(); } static void -eng_gl_get_pixels_post(void *data EINA_UNUSED) +eng_gl_get_pixels_post(void *engine EINA_UNUSED) { evgl_get_pixels_post(); } static Eina_Bool -eng_gl_surface_lock(void *data EINA_UNUSED, void *surface) +eng_gl_surface_lock(void *engine EINA_UNUSED, void *surface) { Evas_GL_Image *im = surface; @@ -1733,7 +1733,7 @@ eng_gl_surface_lock(void *data EINA_UNUSED, void *surface) } static Eina_Bool -eng_gl_surface_unlock(void *data EINA_UNUSED, void *surface) +eng_gl_surface_unlock(void *engine EINA_UNUSED, void *surface) { Evas_GL_Image *im = surface; @@ -1742,7 +1742,7 @@ eng_gl_surface_unlock(void *data EINA_UNUSED, void *surface) } static Eina_Bool -eng_gl_surface_read_pixels(void *data EINA_UNUSED, void *surface, +eng_gl_surface_read_pixels(void *engine EINA_UNUSED, void *surface, int x, int y, int w, int h, Evas_Colorspace cspace, void *pixels) { @@ -1807,9 +1807,9 @@ eng_gl_surface_read_pixels(void *data EINA_UNUSED, void *surface, } static Eina_Bool -eng_gl_surface_query(void *data, void *surface, int attr, void *value) +eng_gl_surface_query(void *engine, void *surface, int attr, void *value) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; EVGL_Surface *sfc = surface; #ifdef GL_GLES @@ -1901,7 +1901,7 @@ eng_gl_surface_query(void *data, void *surface, int attr, void *value) */ default: break; } - evas_gl_common_error_set(data, EVAS_GL_BAD_ATTRIBUTE); + evas_gl_common_error_set(engine, EVAS_GL_BAD_ATTRIBUTE); return EINA_FALSE; } #else @@ -1912,7 +1912,7 @@ eng_gl_surface_query(void *data, void *surface, int attr, void *value) } static int -eng_gl_image_direct_get(void *data EINA_UNUSED, void *image) +eng_gl_image_direct_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im = image; if (!im) return EINA_FALSE; @@ -1920,9 +1920,9 @@ eng_gl_image_direct_get(void *data EINA_UNUSED, void *image) } static void -eng_gl_image_direct_set(void *data, void *image, Eina_Bool direct) +eng_gl_image_direct_set(void *engine, void *image, Eina_Bool direct) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image *im = image; if (!im) return; @@ -1935,7 +1935,7 @@ eng_gl_image_direct_set(void *data, void *image, Eina_Bool direct) //--------------------------------// static int -eng_image_load_error_get(void *data EINA_UNUSED, void *image) +eng_image_load_error_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im; @@ -1945,7 +1945,7 @@ eng_image_load_error_get(void *data EINA_UNUSED, void *image) } static Eina_Bool -eng_image_animated_get(void *data EINA_UNUSED, void *image) +eng_image_animated_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -1958,7 +1958,7 @@ eng_image_animated_get(void *data EINA_UNUSED, void *image) } static int -eng_image_animated_frame_count_get(void *data EINA_UNUSED, void *image) +eng_image_animated_frame_count_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -1972,7 +1972,7 @@ eng_image_animated_frame_count_get(void *data EINA_UNUSED, void *image) } static Evas_Image_Animated_Loop_Hint -eng_image_animated_loop_type_get(void *data EINA_UNUSED, void *image) +eng_image_animated_loop_type_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -1986,7 +1986,7 @@ eng_image_animated_loop_type_get(void *data EINA_UNUSED, void *image) } static int -eng_image_animated_loop_count_get(void *data EINA_UNUSED, void *image) +eng_image_animated_loop_count_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -2000,7 +2000,7 @@ eng_image_animated_loop_count_get(void *data EINA_UNUSED, void *image) } static double -eng_image_animated_frame_duration_get(void *data EINA_UNUSED, void *image, int start_frame, int frame_num) +eng_image_animated_frame_duration_get(void *engine EINA_UNUSED, void *image, int start_frame, int frame_num) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -2014,7 +2014,7 @@ eng_image_animated_frame_duration_get(void *data EINA_UNUSED, void *image, int s } static Eina_Bool -eng_image_animated_frame_set(void *data EINA_UNUSED, void *image, int frame_index) +eng_image_animated_frame_set(void *engine EINA_UNUSED, void *image, int frame_index) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -2031,7 +2031,7 @@ eng_image_animated_frame_set(void *data EINA_UNUSED, void *image, int frame_inde } static Eina_Bool -eng_image_can_region_get(void *data EINA_UNUSED, void *image) +eng_image_can_region_get(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *gim = image; Image_Entry *im; @@ -2043,10 +2043,10 @@ eng_image_can_region_get(void *data EINA_UNUSED, void *image) static void -eng_image_max_size_get(void *data, int *maxw, int *maxh) +eng_image_max_size_get(void *engine, int *maxw, int *maxh) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; gl_context = re->window_gl_context_get(re->software.ob); if (maxw) *maxw = gl_context->shared->info.max_texture_size; @@ -2143,10 +2143,10 @@ eng_pixel_alpha_get(void *image, int x, int y, DATA8 *alpha, int src_region_x, i } static void -eng_context_flush(void *data) +eng_context_flush(void *engine) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; gl_context = re->window_gl_context_get(re->software.ob); @@ -2161,7 +2161,7 @@ eng_context_flush(void *data) } static void -eng_context_clip_image_unset(void *data EINA_UNUSED, void *context) +eng_context_clip_image_unset(void *engine EINA_UNUSED, void *context) { RGBA_Draw_Context *ctx = context; Evas_GL_Image *im = ctx->clip.mask; @@ -2173,7 +2173,7 @@ eng_context_clip_image_unset(void *data EINA_UNUSED, void *context) } static void -eng_context_clip_image_set(void *data, void *context, void *surface, int x, int y, +eng_context_clip_image_set(void *engine, void *context, void *surface, int x, int y, Evas_Public_Data *evas, Eina_Bool do_async) { RGBA_Draw_Context *ctx = context; @@ -2183,7 +2183,7 @@ eng_context_clip_image_set(void *data, void *context, void *surface, int x, int if (ctx->clip.mask) { if (ctx->clip.mask != surface) - eng_context_clip_image_unset(data, context); + eng_context_clip_image_unset(engine, context); else noinc = EINA_TRUE; } @@ -2205,7 +2205,7 @@ eng_context_clip_image_set(void *data, void *context, void *surface, int x, int } static void -eng_context_clip_image_get(void *data EINA_UNUSED, void *context, void **ie, int *x, int *y) +eng_context_clip_image_get(void *engine EINA_UNUSED, void *context, void **ie, int *x, int *y) { RGBA_Draw_Context *ctx = context; @@ -2221,18 +2221,18 @@ eng_context_clip_image_get(void *data EINA_UNUSED, void *context, void **ie, int } static void -eng_context_free(void *data, void *context) +eng_context_free(void *engine, void *context) { RGBA_Draw_Context *ctx = context; if (!ctx) return; if (ctx->clip.mask) - eng_context_clip_image_unset(data, context); + eng_context_clip_image_unset(engine, context); evas_common_draw_context_free(context); } static void * -eng_context_dup(void *data EINA_UNUSED, void *context) +eng_context_dup(void *engine EINA_UNUSED, void *context) { RGBA_Draw_Context *ctx; @@ -2244,9 +2244,9 @@ eng_context_dup(void *data EINA_UNUSED, void *context) } static void -eng_context_3d_use(void *data) +eng_context_3d_use(void *engine) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; if (!re->context_3d) re->context_3d = re->window_gl_context_new(re->software.ob); @@ -2254,9 +2254,9 @@ eng_context_3d_use(void *data) } static E3D_Renderer * -eng_renderer_3d_get(void *data) +eng_renderer_3d_get(void *engine) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; if (!re->renderer_3d) re->renderer_3d = e3d_renderer_new(); @@ -2264,9 +2264,9 @@ eng_renderer_3d_get(void *data) } static void * -eng_drawable_new(void *data, int w, int h, int alpha) +eng_drawable_new(void *engine, int w, int h, int alpha) { - eng_context_3d_use(data); + eng_context_3d_use(engine); #ifdef GL_GLES return e3d_drawable_new(w, h, alpha, GL_DEPTH_STENCIL_OES, GL_NONE); #else @@ -2275,20 +2275,20 @@ eng_drawable_new(void *data, int w, int h, int alpha) } static void -eng_drawable_free(void *data, void *drawable) +eng_drawable_free(void *engine, void *drawable) { - eng_context_3d_use(data); + eng_context_3d_use(engine); e3d_drawable_free(drawable); } static void -eng_drawable_size_get(void *data EINA_UNUSED, void *drawable, int *w, int *h) +eng_drawable_size_get(void *engine EINA_UNUSED, void *drawable, int *w, int *h) { e3d_drawable_size_get((E3D_Drawable *)drawable, w, h); } static void * -eng_image_drawable_set(void *data, void *image, void *drawable) +eng_image_drawable_set(void *engine, void *image, void *drawable) { E3D_Drawable *d = drawable; Evas_Native_Surface ns; @@ -2305,22 +2305,22 @@ eng_image_drawable_set(void *data, void *image, void *drawable) ns.data.opengl.w = w; ns.data.opengl.h = h; - return eng_image_native_set(data, image, &ns); + return eng_image_native_set(engine, image, &ns); } static void -eng_drawable_scene_render(void *data, void *drawable, void *scene_data) +eng_drawable_scene_render(void *engine, void *data EINA_UNUSED, void *drawable, void *scene_data) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; E3D_Renderer *renderer = NULL; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); evas_gl_common_context_flush(gl_context); - eng_context_3d_use(data); - renderer = eng_renderer_3d_get(data); + eng_context_3d_use(engine); + renderer = eng_renderer_3d_get(engine); e3d_drawable_scene_render(drawable, renderer, scene_data); } @@ -2344,79 +2344,79 @@ eng_drawable_texture_pixel_color_get(GLuint tex EINA_UNUSED, int x, int y, } static Eina_Bool -eng_drawable_scene_render_to_texture(void *data, void *drawable, void *scene_data) +eng_drawable_scene_render_to_texture(void *engine, void *drawable, void *scene_data) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; E3D_Renderer *renderer = NULL; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); evas_gl_common_context_flush(gl_context); - eng_context_3d_use(data); - renderer = eng_renderer_3d_get(data); + eng_context_3d_use(engine); + renderer = eng_renderer_3d_get(engine); return e3d_drawable_scene_render_to_texture((E3D_Drawable *)drawable, renderer, scene_data); } static void eng_drawable_texture_rendered_pixels_get(GLuint tex EINA_UNUSED, int x, int y, - int w, int h, void *drawable EINA_UNUSED, void *data) + int w, int h, void *drawable EINA_UNUSED, void *engine) { - e3d_drawable_texture_rendered_pixels_get(tex, x, y, w, h, drawable, data); + e3d_drawable_texture_rendered_pixels_get(tex, x, y, w, h, drawable, engine); } static void * -eng_texture_new(void *data EINA_UNUSED, Eina_Bool use_atlas) +eng_texture_new(void *engine EINA_UNUSED, Eina_Bool use_atlas) { return e3d_texture_new(use_atlas); } static void -eng_texture_free(void *data EINA_UNUSED, void *texture) +eng_texture_free(void *engine EINA_UNUSED, void *texture) { e3d_texture_free((E3D_Texture *)texture); } static void -eng_texture_size_get(void *data EINA_UNUSED, void *texture, int *w, int *h) +eng_texture_size_get(void *engine EINA_UNUSED, void *texture, int *w, int *h) { e3d_texture_size_get((E3D_Texture *)texture, w, h); } static void -eng_texture_wrap_set(void *data EINA_UNUSED, void *texture, +eng_texture_wrap_set(void *engine EINA_UNUSED, void *texture, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t) { e3d_texture_wrap_set((E3D_Texture *)texture, s, t); } static void -eng_texture_wrap_get(void *data EINA_UNUSED, void *texture, +eng_texture_wrap_get(void *engine EINA_UNUSED, void *texture, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t) { e3d_texture_wrap_get((E3D_Texture *)texture, s, t); } static void -eng_texture_filter_set(void *data EINA_UNUSED, void *texture, +eng_texture_filter_set(void *engine EINA_UNUSED, void *texture, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag) { e3d_texture_filter_set((E3D_Texture *)texture, min, mag); } static void -eng_texture_filter_get(void *data EINA_UNUSED, void *texture, +eng_texture_filter_get(void *engine EINA_UNUSED, void *texture, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag) { e3d_texture_filter_get((E3D_Texture *)texture, min, mag); } static void -eng_texture_image_set(void *data, void *texture, void *image) +eng_texture_image_set(void *engine, void *texture, void *image) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); @@ -2425,7 +2425,7 @@ eng_texture_image_set(void *data, void *texture, void *image) } static void * -eng_texture_image_get(void *data EINA_UNUSED, void *texture) +eng_texture_image_get(void *engine EINA_UNUSED, void *texture) { return e3d_texture_get((E3D_Texture *)texture); } @@ -2459,13 +2459,13 @@ eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED) } static void -eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector) +eng_ector_destroy(void *engine EINA_UNUSED, Ector_Surface *ector) { if (ector) efl_del(ector); } static Ector_Buffer * -eng_ector_buffer_wrap(void *data EINA_UNUSED, Evas *evas, void *engine_image) +eng_ector_buffer_wrap(void *engine EINA_UNUSED, Evas *evas, void *engine_image) { Evas_GL_Image *im = engine_image; @@ -2476,11 +2476,11 @@ eng_ector_buffer_wrap(void *data EINA_UNUSED, Evas *evas, void *engine_image) } static Ector_Buffer * -eng_ector_buffer_new(void *data, Evas *evas, int w, int h, +eng_ector_buffer_new(void *engine, Evas *evas, int w, int h, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags) { return efl_add(EVAS_ECTOR_GL_BUFFER_CLASS, evas, - evas_ector_gl_buffer_prepare(efl_added, data, w, h, cspace, flags)); + evas_ector_gl_buffer_prepare(efl_added, engine, w, h, cspace, flags)); } static Efl_Gfx_Render_Op @@ -2498,7 +2498,7 @@ _evas_render_op_to_ector_rop(Evas_Render_Op op) } static void -eng_ector_renderer_draw(void *data, void *context, void *surface, void *engine_data EINA_UNUSED, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async EINA_UNUSED) +eng_ector_renderer_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, void *engine_data EINA_UNUSED, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async EINA_UNUSED) { Evas_GL_Image *dst = surface; Evas_Engine_GL_Context *gc; @@ -2571,7 +2571,7 @@ struct _Evas_GL_Ector }; static void* -eng_ector_new(void *data EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface *ector EINA_UNUSED, void *surface EINA_UNUSED) +eng_ector_new(void *engine EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface *ector EINA_UNUSED, void *surface EINA_UNUSED) { Evas_GL_Ector *r; @@ -2590,12 +2590,12 @@ eng_ector_free(void *engine_data) } static void -eng_ector_begin(void *data, void *context EINA_UNUSED, Ector_Surface *ector, +eng_ector_begin(void *engine, void *context EINA_UNUSED, Ector_Surface *ector, void *surface, void *engine_data, int x, int y, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Ector *buffer = engine_data; int w, h; @@ -2623,7 +2623,7 @@ eng_ector_begin(void *data, void *context EINA_UNUSED, Ector_Surface *ector, return ; } /* evas_gl_common_image_content_hint_set(buffer->gl, EVAS_IMAGE_CONTENT_HINT_DYNAMIC); */ - buffer->gl = eng_image_data_get(data, buffer->gl, 1, &buffer->software, &err, &buffer->tofree); + buffer->gl = eng_image_data_get(engine, buffer->gl, 1, &buffer->software, &err, &buffer->tofree); if (!buffer->gl && err != EVAS_LOAD_ERROR_NONE) { ERR("Mapping of an image for vector graphics [%i, %i] failed with %i\n", w, h, err); @@ -2643,12 +2643,12 @@ eng_ector_begin(void *data, void *context EINA_UNUSED, Ector_Surface *ector, } static void -eng_ector_end(void *data, void *context EINA_UNUSED, Ector_Surface *ector, +eng_ector_end(void *engine, void *context EINA_UNUSED, Ector_Surface *ector, void *surface EINA_UNUSED, void *engine_data, Eina_Bool do_async EINA_UNUSED) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; Evas_GL_Ector *buffer = engine_data; int w, h; Eina_Bool mul_use; @@ -2660,7 +2660,7 @@ eng_ector_end(void *data, void *context EINA_UNUSED, Ector_Surface *ector, mul_use = gl_context->dc->mul.use; ector_buffer_pixels_set(ector, NULL, 0, 0, 0, 0); - buffer->gl = eng_image_data_put(data, buffer->gl, buffer->software); + buffer->gl = eng_image_data_put(engine, buffer->gl, buffer->software); if (!mul_use) { @@ -2688,12 +2688,12 @@ eng_ector_end(void *data, void *context EINA_UNUSED, Ector_Surface *ector, } static Eina_Bool -eng_image_data_map(void *engdata, void **image, Eina_Rw_Slice *slice, +eng_image_data_map(void *engine, void **image, Eina_Rw_Slice *slice, int *stride, int x, int y, int w, int h, Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode, int plane) { - Render_Engine_GL_Generic *re = engdata; + Render_Engine_GL_Generic *re = engine; Evas_GL_Image_Data_Map *map = NULL; Evas_GL_Image *glim, *glim2 = NULL; Eina_Bool ok = EINA_FALSE; @@ -2758,7 +2758,7 @@ eng_image_data_map(void *engdata, void **image, Eina_Rw_Slice *slice, } static Eina_Bool -eng_image_data_unmap(void *engdata EINA_UNUSED, void *image, const Eina_Rw_Slice *slice) +eng_image_data_unmap(void *engine EINA_UNUSED, void *image, const Eina_Rw_Slice *slice) { Evas_GL_Image_Data_Map *map; Evas_GL_Image *im = image; @@ -2795,7 +2795,7 @@ eng_image_data_unmap(void *engdata EINA_UNUSED, void *image, const Eina_Rw_Slice } static int -eng_image_data_maps_get(void *engdata EINA_UNUSED, const void *image, const Eina_Rw_Slice **slices) +eng_image_data_maps_get(void *engine EINA_UNUSED, const void *image, const Eina_Rw_Slice **slices) { Evas_GL_Image_Data_Map *map; const Evas_GL_Image *im = image; @@ -2830,7 +2830,7 @@ _is_yuv(Efl_Gfx_Colorspace cspace) } static void * -eng_image_data_slice_add(void *engdata, void *image, +eng_image_data_slice_add(void *engine, void *image, const Eina_Slice *slice, Eina_Bool copy, int w, int h, int stride, Evas_Colorspace cspace, int plane, Eina_Bool alpha) @@ -2876,16 +2876,16 @@ eng_image_data_slice_add(void *engdata, void *image, case EFL_GFX_COLORSPACE_GRY8: if (plane != 0) goto fail; if (copy) - im = eng_image_new_from_copied_data(engdata, w, h, NULL, alpha, cspace); + im = eng_image_new_from_copied_data(engine, w, h, NULL, alpha, cspace); else - im = eng_image_new_from_data(engdata, w, h, NULL, alpha, cspace); + im = eng_image_new_from_data(engine, w, h, NULL, alpha, cspace); break; case EFL_GFX_COLORSPACE_YCBCR422P601_PL: case EFL_GFX_COLORSPACE_YCBCR422P709_PL: case EFL_GFX_COLORSPACE_YCBCR422601_PL: case EFL_GFX_COLORSPACE_YCBCR420NV12601_PL: - im = eng_image_new_from_data(engdata, w, h, NULL, alpha, cspace); + im = eng_image_new_from_data(engine, w, h, NULL, alpha, cspace); break; default: @@ -3004,12 +3004,12 @@ eng_image_data_slice_add(void *engdata, void *image, return im; fail: - if (im) eng_image_free(engdata, im); + if (im) eng_image_free(engine, im); return NULL; } static void -eng_image_prepare(void *engdata EINA_UNUSED, void *image) +eng_image_prepare(void *engine EINA_UNUSED, void *image) { Evas_GL_Image *im = image; @@ -3018,10 +3018,10 @@ eng_image_prepare(void *engdata EINA_UNUSED, void *image) } static void * -eng_image_surface_noscale_new(void *engdata, int w, int h, int alpha) +eng_image_surface_noscale_new(void *engine, int w, int h, int alpha) { Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = engdata; + Render_Engine_GL_Generic *re = engine; re->window_use(re->software.ob); gl_context = re->window_gl_context_get(re->software.ob); @@ -3029,7 +3029,7 @@ eng_image_surface_noscale_new(void *engdata, int w, int h, int alpha) } static void -eng_image_surface_noscale_region_get(void *engdata EINA_UNUSED, void *image, int *x, int *y, int *w, int *h) +eng_image_surface_noscale_region_get(void *engine EINA_UNUSED, void *image, int *x, int *y, int *w, int *h) { Evas_GL_Image *im = image; @@ -3074,9 +3074,9 @@ _gfx_filter_func_get(Render_Engine_GL_Generic *re, Evas_Filter_Command *cmd) } static Evas_Filter_Support -eng_gfx_filter_supports(void *data, Evas_Filter_Command *cmd) +eng_gfx_filter_supports(void *engine, Evas_Filter_Command *cmd) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; if (!_gfx_filter_func_get(re, cmd)) return pfunc.gfx_filter_supports(&re->software, cmd); @@ -3085,9 +3085,9 @@ eng_gfx_filter_supports(void *data, Evas_Filter_Command *cmd) } static Eina_Bool -eng_gfx_filter_process(void *data, Evas_Filter_Command *cmd) +eng_gfx_filter_process(void *engine, Evas_Filter_Command *cmd) { - Render_Engine_GL_Generic *re = data; + Render_Engine_GL_Generic *re = engine; GL_Filter_Apply_Func funcptr; funcptr = _gfx_filter_func_get(re, cmd); diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.c b/src/modules/evas/engines/gl_sdl/evas_engine.c index 4dc112db69..f9738a7b8b 100644 --- a/src/modules/evas/engines/gl_sdl/evas_engine.c +++ b/src/modules/evas/engines/gl_sdl/evas_engine.c @@ -181,7 +181,7 @@ evgl_eng_native_window_create(void *data EINA_UNUSED) } static int -evgl_eng_native_window_destroy(void *data EINA_UNUSED, void *native_window) +evgl_eng_native_window_destroy(void *data EINA_UNUSED, void *native_window EINA_UNUSED) { /* SDL_DestroyWindow(native_window); */ return 1; @@ -201,7 +201,7 @@ evgl_eng_window_surface_destroy(void *data EINA_UNUSED, } static void * -evgl_eng_context_create(void *data, void *share_ctx EINA_UNUSED, int version) +evgl_eng_context_create(void *data, void *share_ctx EINA_UNUSED, Evas_GL_Context_Version version) { Render_Engine *re = data; @@ -287,7 +287,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Render_Engine *re = NULL; Outbuf *ob = NULL; @@ -333,7 +333,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re = data; @@ -341,7 +341,7 @@ eng_output_free(void *data) } static void -eng_output_dump(void *data) +eng_output_dump(void *engine EINA_UNUSED, void *data) { Render_Engine *re; diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index 13929aaf19..981f30f31b 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -1592,7 +1592,7 @@ _re_winfree(Render_Engine *re) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_GL_X11 *info = in; Render_Engine *re = NULL; @@ -1722,7 +1722,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static int -eng_update(void *data, void *in, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_GL_X11 *info = in; Render_Engine *re = data; @@ -1796,7 +1796,7 @@ eng_update(void *data, void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -1884,14 +1884,14 @@ eng_preload_make_current(void *data, void *doit) } static Eina_Bool -eng_canvas_alpha_get(void *data) +eng_canvas_alpha_get(void *engine) { - Render_Engine *re = (Render_Engine *)data; + Render_Engine *re = (Render_Engine *)engine; return re->generic.software.ob->alpha; } static void -eng_output_dump(void *data) +eng_output_dump(void *engine EINA_UNUSED, void *data) { Render_Engine *re = data; @@ -1903,7 +1903,7 @@ eng_output_dump(void *data) } static void * -eng_gl_current_context_get(void *data EINA_UNUSED) +eng_gl_current_context_get(void *engine EINA_UNUSED) { EVGL_Context *ctx; EVGLNative_Context context; @@ -1926,17 +1926,17 @@ eng_gl_current_context_get(void *data EINA_UNUSED) } static int -eng_gl_error_get(void *data) +eng_gl_error_get(void *engine) { int err; - if ((err = glsym_evas_gl_common_error_get(data)) != EVAS_GL_SUCCESS) + if ((err = glsym_evas_gl_common_error_get(engine)) != EVAS_GL_SUCCESS) goto end; #ifdef GL_GLES err = eglGetError() - EGL_SUCCESS; #else - Render_Engine *re = data; + Render_Engine *re = engine; if (!eng_get_ob(re)->win) err = EVAS_GL_BAD_DISPLAY; @@ -1945,7 +1945,7 @@ eng_gl_error_get(void *data) #endif end: - glsym_evas_gl_common_error_set(data, EVAS_GL_SUCCESS); + glsym_evas_gl_common_error_set(engine, EVAS_GL_SUCCESS); return err; } @@ -2281,7 +2281,7 @@ _native_yinvert_cb(void *image) } static int -eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_init(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -2304,7 +2304,7 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void -eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_shutdown(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -2327,9 +2327,9 @@ eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void * -eng_image_native_set(void *data, void *image, void *native) +eng_image_native_set(void *engine, void *image, void *native) { - Render_Engine *re = (Render_Engine *)data; + Render_Engine *re = (Render_Engine *)engine; const Evas_Native_Surface *ns = native; Evas_GL_Image *im = image, *im2 = NULL; Visual *vis = NULL; diff --git a/src/modules/evas/engines/psl1ght/evas_engine.c b/src/modules/evas/engines/psl1ght/evas_engine.c index a37849de17..b22d3f2d95 100644 --- a/src/modules/evas/engines/psl1ght/evas_engine.c +++ b/src/modules/evas/engines/psl1ght/evas_engine.c @@ -40,29 +40,6 @@ struct _Render_Engine /* prototypes we will use here */ static void *_output_setup(int w, int h); -static void *eng_info(Evas *e); -static void - eng_info_free(Evas *e, void *info); -static void - eng_output_free(void *data); -static void - eng_output_resize(void *data, int w, int h); -static void - eng_output_tile_size_set(void *data, int w, int h); -static void - eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); -static void - eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); -static void - eng_output_redraws_clear(void *data); -static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); -static void - eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h, Evas_Render_Mode render_mode); -static void - eng_output_flush(void *data, Evas_Render_Mode render_mode); -static void - eng_output_idle_flush(void *data); - /* internal engine routines */ static void * _output_setup(int w, int h) @@ -148,7 +125,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_PSL1GHT *info = in; @@ -158,7 +135,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; int i; @@ -190,7 +167,7 @@ eng_output_free(void *data) } static void -eng_output_resize(void *data, int w, int h) +eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h) { Render_Engine *re; int i; @@ -236,7 +213,7 @@ eng_output_resize(void *data, int w, int h) } static void -eng_output_tile_size_set(void *data, int w, int h) +eng_output_tile_size_set(void *engine EINA_UNUSED, void *data, int w, int h) { Render_Engine *re; @@ -246,7 +223,7 @@ eng_output_tile_size_set(void *data, int w, int h) } static void -eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +eng_output_redraws_rect_add(void *engine EINA_UNUSED, void *data, int x, int y, int w, int h) { Render_Engine *re; @@ -256,7 +233,7 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) } static void -eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +eng_output_redraws_rect_del(void *engine EINA_UNUSED, void *data, int x, int y, int w, int h) { Render_Engine *re; @@ -266,7 +243,7 @@ eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) } static void -eng_output_redraws_clear(void *data) +eng_output_redraws_clear(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -276,7 +253,7 @@ eng_output_redraws_clear(void *data) } static void * -eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +eng_output_redraws_next_update_get(void *engine EINA_UNUSED, void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) { Render_Engine *re; Tilebuf_Rect *rect; @@ -319,13 +296,13 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i } static void -eng_output_redraws_next_update_push(void *data EINA_UNUSED, void *surface EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED, Evas_Render_Mode render_mode EINA_UNUSED) +eng_output_redraws_next_update_push(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *surface EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED, Evas_Render_Mode render_mode EINA_UNUSED) { /* Don't do anything, we'll just coy the whole buffer when it's time to flush */ } static void -eng_output_flush(void *data, Evas_Render_Mode render_mode) +eng_output_flush(void *engine EINA_UNUSED, void *data, Evas_Render_Mode render_mode) { Render_Engine *re; rsxBuffer *buffer; @@ -406,7 +383,7 @@ eng_output_flush(void *data, Evas_Render_Mode render_mode) } static void -eng_output_idle_flush(void *data) +eng_output_idle_flush(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -415,12 +392,12 @@ eng_output_idle_flush(void *data) } static Eina_Bool -eng_canvas_alpha_get(void *data) +eng_canvas_alpha_get(void *engine) { Render_Engine *re; // printf ("eng_output_alpha_get called\n"); - re = (Render_Engine *)data; + re = (Render_Engine *)engine; return EINA_TRUE; } diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c b/src/modules/evas/engines/software_ddraw/evas_engine.c index 367d3f6be1..7772320b2f 100644 --- a/src/modules/evas/engines/software_ddraw/evas_engine.c +++ b/src/modules/evas/engines/software_ddraw/evas_engine.c @@ -88,7 +88,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Software_DDraw *info = in; @@ -100,7 +100,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -112,7 +112,7 @@ eng_output_free(void *data) } static Eina_Bool -eng_canvas_alpha_get(void *data EINA_UNUSED) +eng_canvas_alpha_get(void *engine EINA_UNUSED) { #warning "We need to handle window with alpha channel." return EINA_FALSE; diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c b/src/modules/evas/engines/software_gdi/evas_engine.c index e4c76acac1..555862a666 100644 --- a/src/modules/evas/engines/software_gdi/evas_engine.c +++ b/src/modules/evas/engines/software_gdi/evas_engine.c @@ -91,7 +91,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Software_Gdi *info; @@ -107,7 +107,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static int -eng_update(void *data, void *in, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Software_Gdi *info; Render_Engine *re = data; @@ -136,7 +136,7 @@ eng_update(void *data, void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -148,7 +148,7 @@ eng_output_free(void *data) } static Eina_Bool -eng_canvas_alpha_get(void *data EINA_UNUSED) +eng_canvas_alpha_get(void *engine EINA_UNUSED) { #warning "We need to handle window with alpha channel." return EINA_FALSE; diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index dbc2c4a0e2..c219769454 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -443,7 +443,7 @@ static int _evas_soft_gen_log_dom = -1; #define QCMD evas_thread_queue_flush static void -eng_output_dump(void *data EINA_UNUSED) +eng_output_dump(void *engine EINA_UNUSED, void *data EINA_UNUSED) { evas_common_image_image_all_unload(); evas_common_font_font_all_unload(); @@ -732,7 +732,7 @@ _draw_rectangle_thread_cmd(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, } static void -eng_rectangle_draw(void *data EINA_UNUSED, void *context, void *surface, int x, int y, int w, int h, Eina_Bool do_async) +eng_rectangle_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, int x, int y, int w, int h, Eina_Bool do_async) { if (do_async) evas_common_rectangle_draw_cb(surface, context, x, y, w, h, @@ -858,7 +858,7 @@ _line_draw_thread_cmd(RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, in } static void -eng_line_draw(void *data EINA_UNUSED, void *context, void *surface, int x1, int y1, int x2, int y2, Eina_Bool do_async) +eng_line_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, int x1, int y1, int x2, int y2, Eina_Bool do_async) { if (do_async) _line_draw_thread_cmd(surface, context, x1, y1, x2, y2); #ifdef BUILD_PIPE_RENDER @@ -995,7 +995,7 @@ _polygon_draw_thread_cmd(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po } static void -eng_polygon_draw(void *data EINA_UNUSED, void *context, void *surface, void *polygon, int x, int y, Eina_Bool do_async) +eng_polygon_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, void *polygon, int x, int y, Eina_Bool do_async) { if (do_async) _polygon_draw_thread_cmd(surface, context, polygon, x, y); #ifdef BUILD_PIPE_RENDER @@ -2518,7 +2518,7 @@ _image_thr_cb_sample(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, in } static Eina_Bool -eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async) +eng_image_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async) { RGBA_Image *im; @@ -2806,7 +2806,7 @@ _map_draw_thread_cmd(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RG } static void -evas_software_image_map_draw(void *data, void *context, RGBA_Image *surface, RGBA_Image *im, RGBA_Map *m, int smooth, int level, int offset) +evas_software_image_map_draw(void *engine EINA_UNUSED, void *data, void *context, RGBA_Image *surface, RGBA_Image *im, RGBA_Map *m, int smooth, int level, int offset) { if (m->count - offset < 3) return; @@ -2843,7 +2843,7 @@ evas_software_image_map_draw(void *data, void *context, RGBA_Image *surface, RGB dw = (m->pts[2 + offset].x >> FP) - dx; dh = (m->pts[2 + offset].y >> FP) - dy; eng_image_draw - (data, context, surface, im, + (engine, data, context, surface, im, 0, 0, im->cache_entry.w, im->cache_entry.h, dx, dy, dw, dh, smooth, EINA_FALSE); @@ -2869,12 +2869,12 @@ evas_software_image_map_draw(void *data, void *context, RGBA_Image *surface, RGB if (m->count > 4) { - evas_software_image_map_draw(data, context, surface, im, m, smooth, level, offset + 2); + evas_software_image_map_draw(engine, data, context, surface, im, m, smooth, level, offset + 2); } } static Eina_Bool -eng_image_map_draw(void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async) +eng_image_map_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async) { RGBA_Image *im = image; @@ -2904,7 +2904,7 @@ eng_image_map_draw(void *data, void *context, void *surface, void *image, RGBA_M _map_draw_thread_cmd); } else - evas_software_image_map_draw(data, context, surface, im, m, + evas_software_image_map_draw(engine, data, context, surface, im, m, smooth, level, 0); return EINA_FALSE; @@ -3077,7 +3077,7 @@ _multi_font_draw_thread_cmd(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y } static Eina_Bool -eng_multi_font_draw(void *data EINA_UNUSED, void *context, void *surface, Evas_Font_Set *font EINA_UNUSED, int x, int y, int w EINA_UNUSED, int h EINA_UNUSED, int ow EINA_UNUSED, int oh EINA_UNUSED, Evas_Font_Array *texts, Eina_Bool do_async) +eng_multi_font_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, Evas_Font_Set *font EINA_UNUSED, int x, int y, int w EINA_UNUSED, int h EINA_UNUSED, int ow EINA_UNUSED, int oh EINA_UNUSED, Evas_Font_Array *texts, Eina_Bool do_async) { if (!texts) return EINA_FALSE; @@ -3398,7 +3398,7 @@ _font_draw_thread_cmd(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas } static Eina_Bool -eng_font_draw(void *data EINA_UNUSED, void *context, void *surface, Evas_Font_Set *font EINA_UNUSED, int x, int y, int w EINA_UNUSED, int h EINA_UNUSED, int ow EINA_UNUSED, int oh EINA_UNUSED, Evas_Text_Props *text_props, Eina_Bool do_async) +eng_font_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, Evas_Font_Set *font EINA_UNUSED, int x, int y, int w EINA_UNUSED, int h EINA_UNUSED, int ow EINA_UNUSED, int oh EINA_UNUSED, Evas_Text_Props *text_props, Eina_Bool do_async) { if (do_async) { @@ -3884,7 +3884,7 @@ eng_gl_rotation_angle_get(void *data EINA_UNUSED) */ static void -eng_output_resize(void *data, int w, int h) +eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h) { Render_Engine_Software_Generic *re; @@ -3903,7 +3903,7 @@ eng_output_resize(void *data, int w, int h) } static void -eng_output_tile_size_set(void *data, int w, int h) +eng_output_tile_size_set(void *engine EINA_UNUSED, void *data, int w, int h) { Render_Engine_Software_Generic *re; @@ -3912,7 +3912,7 @@ eng_output_tile_size_set(void *data, int w, int h) } static void -eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +eng_output_redraws_rect_add(void *engine EINA_UNUSED, void *data, int x, int y, int w, int h) { Render_Engine_Software_Generic *re; @@ -3921,7 +3921,7 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) } static void -eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +eng_output_redraws_rect_del(void *engine EINA_UNUSED, void *data, int x, int y, int w, int h) { Render_Engine_Software_Generic *re; @@ -3930,7 +3930,7 @@ eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) } static void -eng_output_redraws_clear(void *data) +eng_output_redraws_clear(void *engine EINA_UNUSED, void *data) { Render_Engine_Software_Generic *re; @@ -4135,7 +4135,7 @@ _merge_rects(Render_Engine_Merge_Mode merge_mode, static void * -eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +eng_output_redraws_next_update_get(void *engine EINA_UNUSED, void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) { Render_Engine_Software_Generic *re; void *surface; @@ -4263,7 +4263,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i } static void -eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h, Evas_Render_Mode render_mode) +eng_output_redraws_next_update_push(void *engine EINA_UNUSED, void *data, void *surface, int x, int y, int w, int h, Evas_Render_Mode render_mode) { Render_Engine_Software_Generic *re; @@ -4279,7 +4279,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int } static void -eng_output_flush(void *data, Evas_Render_Mode render_mode) +eng_output_flush(void *engine EINA_UNUSED, void *data, Evas_Render_Mode render_mode) { Render_Engine_Software_Generic *re; @@ -4295,7 +4295,7 @@ eng_output_flush(void *data, Evas_Render_Mode render_mode) } static void -eng_output_idle_flush(void *data) +eng_output_idle_flush(void *engine EINA_UNUSED, void *data) { Render_Engine_Software_Generic *re; @@ -4419,7 +4419,7 @@ _draw_thread_ector_draw(void *data) } static void -eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, void *engine_data EINA_UNUSED, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async) +eng_ector_renderer_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context, void *surface, void *engine_data EINA_UNUSED, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async) { RGBA_Image *dst = surface; RGBA_Draw_Context *dc = context; diff --git a/src/modules/evas/engines/software_x11/evas_engine.c b/src/modules/evas/engines/software_x11/evas_engine.c index 562c5f1c8e..29ece83cb5 100644 --- a/src/modules/evas/engines/software_x11/evas_engine.c +++ b/src/modules/evas/engines/software_x11/evas_engine.c @@ -51,10 +51,6 @@ static void *_best_visual_get(int backend, void *connection, int screen); static unsigned int _best_colormap_get(int backend, void *connection, int screen); static int _best_depth_get(int backend, void *connection, int screen); -static void *eng_info(Evas *eo_e); -static void eng_info_free(Evas *eo_e, void *info); -static void eng_output_free(void *data); - static Eina_List *_outbufs = NULL; /* internal engine routines */ @@ -263,7 +259,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info) } static void * -eng_setup(void *in, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Software_X11 *info = in; Render_Engine *re = NULL; @@ -314,7 +310,7 @@ eng_setup(void *in, unsigned int w, unsigned int h) } static int -eng_update(void *data, void *in, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *in, unsigned int w, unsigned int h) { Evas_Engine_Info_Software_X11 *info = in; Render_Engine *re = data; @@ -373,7 +369,7 @@ eng_update(void *data, void *in, unsigned int w, unsigned int h) } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -387,11 +383,11 @@ eng_output_free(void *data) } static Eina_Bool -eng_canvas_alpha_get(void *data) +eng_canvas_alpha_get(void *engine) { Render_Engine *re; - re = (Render_Engine *)data; + re = (Render_Engine *)engine; return (re->generic.ob->priv.destination_alpha) || (re->outbuf_alpha_get(re->generic.ob)); } @@ -411,7 +407,7 @@ _native_evasgl_free(void *image) } static int -eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_init(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -429,7 +425,7 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void -eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_shutdown(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -448,9 +444,9 @@ eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void * -eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) +eng_image_native_set(void *engine, void *image, void *native) { - Render_Engine *re = (Render_Engine *)data; + Render_Engine *re = (Render_Engine *)engine; Evas_Native_Surface *ns = native; Image_Entry *ie = image, *ie2 = NULL; RGBA_Image *im = image; @@ -556,7 +552,7 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) } static void * -eng_image_native_get(void *data EINA_UNUSED, void *image) +eng_image_native_get(void *engine EINA_UNUSED, void *image) { RGBA_Image *im = image; Native *n; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index d337da3956..0496f6b9dd 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -569,7 +569,7 @@ _eng_merge_mode_get(void) } static void * -eng_setup(void *info, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *info, unsigned int w, unsigned int h) { Evas_Engine_Info_Wayland *inf = info; Render_Engine *re; @@ -658,7 +658,7 @@ ob_err: } static int -eng_update(void *data, void *info, unsigned int w, unsigned int h) +eng_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int w, unsigned int h) { Evas_Engine_Info_Wayland *inf = info; Render_Engine *re = data; @@ -755,18 +755,18 @@ ob_err: } static Eina_Bool -eng_canvas_alpha_get(void *data) +eng_canvas_alpha_get(void *engine) { Render_Engine *re; - if ((re = (Render_Engine *)data)) + if ((re = (Render_Engine *)engine)) return re->generic.software.ob->alpha; return EINA_FALSE; } static void -eng_output_free(void *data) +eng_output_free(void *engine EINA_UNUSED, void *data) { Render_Engine *re; @@ -791,7 +791,7 @@ eng_output_free(void *data) } static void -eng_output_dump(void *data) +eng_output_dump(void *engine EINA_UNUSED, void *data) { Outbuf *ob; Render_Engine *re; @@ -999,7 +999,7 @@ _native_cb_yinvert(void *image) } static int -eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_init(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -1021,7 +1021,7 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void -eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_shutdown(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -1043,7 +1043,7 @@ eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void * -eng_image_native_set(void *data, void *image, void *native) +eng_image_native_set(void *engine, void *image, void *native) { Render_Engine *re; Outbuf *ob; @@ -1055,7 +1055,7 @@ eng_image_native_set(void *data, void *image, void *native) void *buffer = NULL; void *wlid, *wl_buf = NULL; - if (!(re = (Render_Engine *)data)) return NULL; + if (!(re = (Render_Engine *)engine)) return NULL; if (!(ob = eng_get_ob(re))) return NULL; ns = native; diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c index ddaf159d82..a5f72c50db 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@ -20,8 +20,6 @@ static Evas_Func func, pfunc; Evas_Native_Tbm_Surface_Image_Set_Call glsym__evas_native_tbm_surface_image_set = NULL; Evas_Native_Tbm_Surface_Stride_Get_Call glsym__evas_native_tbm_surface_stride_get = NULL; -static void eng_output_resize(void *data, int w, int h); - /* engine structure data */ typedef struct _Render_Engine Render_Engine; struct _Render_Engine @@ -136,7 +134,7 @@ eng_info_free(Evas *eo_evas EINA_UNUSED, void *info) } static void * -eng_setup(void *info, unsigned int w, unsigned int h) +eng_setup(void *engine EINA_UNUSED, void *info, unsigned int w, unsigned int h) { Evas_Engine_Info_Wayland *einfo = info; @@ -145,38 +143,8 @@ eng_setup(void *info, unsigned int w, unsigned int h) return _render_engine_swapbuf_setup(w, h, einfo); } -static int -eng_update(void *data, void *info, unsigned int w, unsigned int h) -{ - Evas_Engine_Info_Wayland *einfo = info; - Render_Engine *re = data; - - if (!einfo->info.wl_surface) return 0; - - _evas_outbuf_surface_set(re->generic.ob, einfo->info.wl_shm, einfo->info.wl_dmabuf, einfo->info.wl_surface); - - eng_output_resize(re, w, h); - - evas_render_engine_software_generic_update(&re->generic, re->generic.ob, - w, h); - - return 1; -} - static void -eng_output_free(void *data) -{ - Render_Engine *re; - - if ((re = (Render_Engine *)data)) - { - evas_render_engine_software_generic_clean(&re->generic); - free(re); - } -} - -static void -eng_output_resize(void *data, int w, int h) +eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h) { Render_Engine *re; Evas_Engine_Info_Wayland *einfo; @@ -203,7 +171,37 @@ eng_output_resize(void *data, int w, int h) } static int -eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_update(void *engine, void *data, void *info, unsigned int w, unsigned int h) +{ + Evas_Engine_Info_Wayland *einfo = info; + Render_Engine *re = data; + + if (!einfo->info.wl_surface) return 0; + + _evas_outbuf_surface_set(re->generic.ob, einfo->info.wl_shm, einfo->info.wl_dmabuf, einfo->info.wl_surface); + + eng_output_resize(engine, data, w, h); + + evas_render_engine_software_generic_update(&re->generic, re->generic.ob, + w, h); + + return 1; +} + +static void +eng_output_free(void *engine EINA_UNUSED, void *data) +{ + Render_Engine *re; + + if ((re = (Render_Engine *)data)) + { + evas_render_engine_software_generic_clean(&re->generic); + free(re); + } +} + +static int +eng_image_native_init(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -218,7 +216,7 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type) } static void -eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type) +eng_image_native_shutdown(void *engine EINA_UNUSED, Evas_Native_Surface_Type type) { switch (type) { @@ -246,7 +244,7 @@ _native_evasgl_free(void *image) } static void * -eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) +eng_image_native_set(void *engine EINA_UNUSED, void *image, void *native) { Evas_Native_Surface *ns = native; Image_Entry *ie = image; @@ -326,7 +324,7 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) } static void * -eng_image_native_get(void *data EINA_UNUSED, void *image) +eng_image_native_get(void *engine EINA_UNUSED, void *image) { RGBA_Image *im = image; Native *n;