diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2017-05-12 15:03:05 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2017-05-12 15:24:45 -0700 |
commit | 35e54acc4678dd50bafbb86a015892b2937a97c7 (patch) | |
tree | 8fc8fd31202d53fdabee21b8d1763c41a9c9fbb8 /src/lib/evas | |
parent | ad2ba804c69e38cc925e80ace843fe400e303319 (diff) | |
download | efl-35e54acc4678dd50bafbb86a015892b2937a97c7.tar.gz |
evas: stat introducing a concept of engine and output in the backend.
Diffstat (limited to 'src/lib/evas')
22 files changed, 634 insertions, 613 deletions
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_color_set(output, context, 0, 0, 0, 0); + 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(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 (*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 *(*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 (*rectangle_draw) (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 *(*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 *(*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 *(*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 *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 *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 *engine, void *data, void *context, void *surface, int x, int y, int w, int h, 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 *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 *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_prepare) (void *data, 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); - - 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); - - void (*image_cache_flush) (void *data); - void (*image_cache_set) (void *data, int bytes); - int (*image_cache_get) (void *data); - - 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); + 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 *engine, void *image); + + 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 *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 *engine); + void (*image_cache_set) (void *engine, int bytes); + int (*image_cache_get) (void *engine); + + 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); - - 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); + 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 *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; |