evas vg: remove ector usage: efl_canvas_vg_shape.c 17/257917/3
authorMichal Maciola <m.maciola@samsung.com>
Wed, 21 Apr 2021 08:47:26 +0000 (10:47 +0200)
committerHermet Park <chuneon.park@samsung.com>
Mon, 10 May 2021 04:29:28 +0000 (04:29 +0000)
Removed ector calls / HAVE_THORVG blocks from evas file efl_canvas_vg_shape.c

Change-Id: Ic89f97f4cc797a818acb7497bbb72502d7279dfb

src/lib/evas/canvas/efl_canvas_vg_shape.c

index 6c7870a..4c0aea6 100644 (file)
@@ -5,11 +5,7 @@
 
 #define MY_CLASS EFL_CANVAS_VG_SHAPE_CLASS
 
-#ifdef HAVE_THORVG
 #include "evas_vg_path_helper.h"
-#endif
-
-#ifdef HAVE_THORVG
 
 #define DASH_PATTERN_EL_SIZE 2
 
@@ -20,8 +16,6 @@ typedef enum
   PATH_CMD_TYPE_BEZIER_QUADRATIC /**< For svg path commands T/t/Q/q */
 } Path_Cmd_Type;
 
-#endif
-
 typedef struct _Efl_Canvas_Vg_Shape_Data Efl_Canvas_Vg_Shape_Data;
 
 struct _Efl_Canvas_Vg_Shape_Data
@@ -30,10 +24,10 @@ struct _Efl_Canvas_Vg_Shape_Data
 
    struct {
       Efl_Canvas_Vg_Node *fill;
-      Efl_Canvas_Vg_Node *marker;
+      Efl_Canvas_Vg_Node *marker; //FIX_TVG: marker not supported
    } stroke;
 
-#ifdef HAVE_THORVG
+
    Tvg_Paint *shape;
 
    //Variables need by cubic, squbic and arc_to. Used to recreate properly svg_path
@@ -53,10 +47,8 @@ struct _Efl_Canvas_Vg_Shape_Data
    //Flag indicates if shape was started. It is used to store start position
    //and keep shape current point valid when shape close API is called.
    Eina_Bool started;
-#endif
 };
 
-#ifdef HAVE_THORVG
 static inline double
 _interpolate(double from, double to, double pos_map)
 {
@@ -547,7 +539,6 @@ _shape_interpolate(Evas_Vg_Shape *obj,
 
    return EINA_TRUE;
 }
-#endif
 // FIXME: Use the renderer bounding box when it has been created instead of an estimation
 
 static void
@@ -567,10 +558,8 @@ _efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED,
    pd->fill = efl_ref(f);
    efl_unref(tmp);
 
-#ifdef HAVE_THORVG
    Efl_Canvas_Vg_Gradient_Data *gd = efl_data_scope_get(pd->fill, EFL_CANVAS_VG_GRADIENT_CLASS);
    if (gd) gd->gradient_render_pre_tvg(gd, pd->shape, EVAS_VG_GRADIENT_OWNER_TYPE_SHAPE);
-#endif
 }
 
 static Efl_Canvas_Vg_Node *
@@ -596,10 +585,8 @@ _efl_canvas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED,
    pd->stroke.fill = efl_ref(f);
    efl_unref(tmp);
 
-#ifdef HAVE_THORVG
    Efl_Canvas_Vg_Gradient_Data *gd = efl_data_scope_get(pd->stroke.fill, EFL_CANVAS_VG_GRADIENT_CLASS);
    if (gd) gd->gradient_render_pre_tvg(gd, pd->shape, EVAS_VG_GRADIENT_OWNER_TYPE_STROKE);
-#endif
 }
 
 static Efl_Canvas_Vg_Node *
@@ -627,60 +614,6 @@ _efl_canvas_vg_shape_stroke_marker_get(const Eo *obj EINA_UNUSED,
    return pd->stroke.marker;
 }
 
-#ifndef HAVE_THORVG
-static void
-_efl_canvas_vg_shape_render_pre(Evas_Object_Protected_Data *vg_pd,
-                                Efl_VG *obj,
-                                Efl_Canvas_Vg_Node_Data *nd,
-                                void *engine, void *output, void *context,
-                                Ector_Surface *surface,
-                                Eina_Matrix3 *ptransform,
-                                int p_opacity,
-                                Ector_Buffer *comp,
-                                Efl_Gfx_Vg_Composite_Method comp_method,
-                                void *data)
-{
-   Efl_Canvas_Vg_Shape_Data *pd = data;
-   Efl_Canvas_Vg_Node_Data *fill, *stroke_fill, *stroke_marker;
-
-   if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return;
-
-   nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
-
-   EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
-   EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, p_opacity, nd);
-
-   fill = _evas_vg_render_pre(vg_pd, pd->fill,
-                              engine, output, context,
-                              surface, ctransform, c_a, comp, comp_method);
-   stroke_fill = _evas_vg_render_pre(vg_pd, pd->stroke.fill,
-                                     engine, output, context,
-                                     surface, ctransform, c_a, comp, comp_method);
-   stroke_marker = _evas_vg_render_pre(vg_pd, pd->stroke.marker,
-                                       engine, output, context,
-                                       surface, ctransform, c_a, comp, comp_method);
-
-   if (!nd->renderer)
-     {
-        efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
-        nd->renderer = ector_surface_renderer_factory_new(surface, ECTOR_RENDERER_SHAPE_MIXIN);
-        efl_domain_current_pop();
-     }
-   ector_renderer_transformation_set(nd->renderer, ctransform);
-   ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
-   ector_renderer_color_set(nd->renderer, c_r, c_g, c_b, c_a);
-   ector_renderer_visibility_set(nd->renderer, nd->visibility);
-   ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL);
-   ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL);
-   ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL);
-   efl_gfx_path_copy_from(nd->renderer, obj);
-   efl_gfx_path_commit(nd->renderer);
-   ector_renderer_prepare(nd->renderer);
-   ector_renderer_comp_method_set(nd->renderer, comp, comp_method);
-}
-#endif
-
-#ifdef HAVE_THORVG
 static void
 _efl_canvas_vg_shape_render_pre_tvg(EINA_UNUSED Evas_Object_Protected_Data *vg_pd,
                                     Efl_VG *obj,
@@ -729,23 +662,18 @@ _efl_canvas_vg_shape_render_pre_tvg(EINA_UNUSED Evas_Object_Protected_Data *vg_p
    if (scene) tvg_scene_push(scene, sd->shape);
    else if (canvas) tvg_canvas_push(canvas, sd->shape);
 }
-#endif
 
 static void
 _efl_canvas_vg_shape_efl_gfx_path_bounds_get(const Eo *obj EINA_UNUSED,
                                                  Efl_Canvas_Vg_Shape_Data *sd,
                                                  Eina_Rect *r)
 {
-#ifndef HAVE_THORVG
-   efl_gfx_path_bounds_get(efl_super(obj, MY_CLASS), r);
-#else
    float px, py, pw, ph;
    tvg_paint_get_bounds(sd->shape, &px, &py, &pw, &ph);
    r->x = (int)px;
    r->y = (int)py;
    r->w = (int)pw;
    r->h = (int)ph;
-#endif
 }
 
 static Eo *
@@ -756,18 +684,6 @@ _efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *p
    obj = efl_constructor(efl_super(obj, MY_CLASS));
    nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
 
-#ifndef HAVE_THORVG
-   efl_gfx_shape_stroke_scale_set(obj, 1);
-   efl_gfx_shape_stroke_location_set(obj, 0.5);
-   efl_gfx_shape_stroke_cap_set(obj, EFL_GFX_CAP_BUTT);
-   efl_gfx_shape_stroke_join_set(obj, EFL_GFX_JOIN_MITER);
-
-   //NOTE: The default value is 4. It only refers to the standard of web svg.
-   //      https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit
-   efl_gfx_shape_stroke_miterlimit_set(obj, 4);
-
-   nd->render_pre = _efl_canvas_vg_shape_render_pre;
-#else
    nd->render_pre_tvg = _efl_canvas_vg_shape_render_pre_tvg;
    pd->shape = tvg_shape_new();
    pd->scale = 1.0;
@@ -776,7 +692,6 @@ _efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *p
    //default EFL implementation. We don't want to draw invisible shapes.
    //when object is visible, renderer changes opacity to valid value.
    tvg_paint_set_opacity(pd->shape, 0);
-#endif
 
    nd->data = pd;
    return obj;
@@ -789,54 +704,19 @@ _efl_canvas_vg_shape_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *pd
    if (pd->stroke.fill) efl_unref(pd->stroke.fill);
    if (pd->stroke.marker) efl_unref(pd->stroke.marker);
 
-#ifdef HAVE_THORVG
    tvg_paint_del(pd->shape);
-#else
-   efl_gfx_path_reset(obj);
-#endif
 
    efl_destructor(efl_super(obj, MY_CLASS));
 }
 
 static Eina_Bool
 _efl_canvas_vg_shape_efl_gfx_path_interpolate(Eo *obj,
-                                              Efl_Canvas_Vg_Shape_Data *pd,
+                                              Efl_Canvas_Vg_Shape_Data *pd EINA_UNUSED,
                                               const Efl_Canvas_Vg_Node *from,
                                               const Efl_Canvas_Vg_Node *to,
                                               double pos_map)
 {
-   Eina_Bool r = EINA_TRUE;
-#ifndef HAVE_THORVG
-   Efl_Canvas_Vg_Shape_Data *fromd, *tod;
-
-   //Check if both objects have same type
-   if (!(efl_isa(from, MY_CLASS) && efl_isa(to, MY_CLASS)))
-     return EINA_FALSE;
-
-   //Is this the best way?
-   r &= efl_gfx_path_interpolate(efl_cast(obj, EFL_CANVAS_VG_NODE_CLASS),
-                                 from, to, pos_map);
-   r &= efl_gfx_path_interpolate(efl_super(obj, MY_CLASS), from, to, pos_map);
-
-   fromd = efl_data_scope_get(from, MY_CLASS);
-   tod = efl_data_scope_get(to, MY_CLASS);
-
-   //Fill
-   if (fromd->fill && tod->fill && pd->fill)
-     r &= efl_gfx_path_interpolate(pd->fill, fromd->fill, tod->fill, pos_map);
-
-   //Stroke Fill
-   if (fromd->stroke.fill && tod->stroke.fill && pd->stroke.fill)
-     r &= efl_gfx_path_interpolate(pd->stroke.fill, fromd->stroke.fill, tod->stroke.fill, pos_map);
-
-   //Stroke Marker
-   if (fromd->stroke.marker && tod->stroke.marker && pd->stroke.marker)
-     r &= efl_gfx_path_interpolate(pd->stroke.marker, fromd->stroke.marker, tod->stroke.marker, pos_map);
-#else
-   r = evas_vg_shape_interpolate(obj, from, to, pos_map);
-#endif
-
-   return r;
+   return evas_vg_shape_interpolate(obj, from, to, pos_map);
 }
 
 EOLIAN static void
@@ -849,35 +729,6 @@ _efl_canvas_vg_shape_efl_gfx_path_commit(Eo *obj,
 EOLIAN static Efl_Canvas_Vg_Node *
 _efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_Data *pd)
 {
-#ifndef HAVE_THORVG
-   Efl_Canvas_Vg_Node *node;
-   Efl_Canvas_Vg_Shape_Data *sd;
-
-   node = efl_duplicate(efl_super(obj, MY_CLASS));
-   sd = efl_data_scope_get(node, MY_CLASS);
-
-   if (pd->fill)
-     {
-        sd->fill = efl_duplicate(pd->fill);
-        efl_parent_set(sd->fill, efl_parent_get(node));
-     }
-
-   if (pd->stroke.fill)
-     {
-        sd->stroke.fill = efl_duplicate(pd->stroke.fill);
-        efl_parent_set(sd->stroke.fill, efl_parent_get(node));
-     }
-
-   if (pd->stroke.marker)
-     {
-        sd->stroke.marker = efl_duplicate(pd->stroke.marker);
-        efl_parent_set(sd->stroke.marker, efl_parent_get(node));
-     }
-
-   efl_gfx_path_copy_from(node, obj);
-
-   return node;
-#else
    Efl_Canvas_Vg_Node *node = NULL;
    Efl_Canvas_Vg_Shape_Data *sd = NULL;
 
@@ -918,28 +769,22 @@ _efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_
    sd->cmd_prev = pd->cmd_prev;
 
    return node;
-#endif
 }
 
 EAPI double
 evas_vg_shape_stroke_scale_get(Evas_Vg_Shape *obj)
 {
-#ifdef HAVE_THORVG
    if (!obj) return 0;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
    if (!sd) return 0;
 
    return sd->scale;
-#else
-   return efl_gfx_shape_stroke_scale_get(obj);
-#endif
 }
 
 EAPI void
 evas_vg_shape_stroke_scale_set(Evas_Vg_Shape *obj, double s)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -948,16 +793,13 @@ evas_vg_shape_stroke_scale_set(Evas_Vg_Shape *obj, double s)
    sd->scale = s;
 
    tvg_shape_set_stroke_width(sd->shape, sd->scale * sd->width);
-#else
-   efl_gfx_shape_stroke_scale_set(obj, s);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_stroke_color_get(Evas_Vg_Shape *obj, int *r, int *g, int *b, int *a)
 {
-#ifdef HAVE_THORVG
    uint8_t r2, g2, b2, a2;
    tvg_shape_get_stroke_color(_get_tvg_shape(obj), &r2, &g2, &b2, &a2);
    if (r) *r = (uint32_t)r2;
@@ -968,39 +810,28 @@ evas_vg_shape_stroke_color_get(Evas_Vg_Shape *obj, int *r, int *g, int *b, int *
         *a = (uint32_t)a2;
         evas_color_argb_premul(*a, r, g, b);
      }
-#else
-   efl_gfx_shape_stroke_color_get(obj, r, g, b, a);
-#endif
 }
 
 EAPI void
 evas_vg_shape_stroke_color_set(Evas_Vg_Shape *obj, int r, int g, int b, int a)
 {
-#ifdef HAVE_THORVG
    evas_color_argb_unpremul(a, &r, &g, &b);
    tvg_shape_set_stroke_color(_get_tvg_shape(obj), r, g, b, a);
-#else
-   efl_gfx_shape_stroke_color_set(obj, r, g, b, a);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI double
 evas_vg_shape_stroke_width_get(Evas_Vg_Shape *obj)
 {
-#ifdef HAVE_THORVG
    float w = 0.0;
    tvg_shape_get_stroke_width(_get_tvg_shape(obj), &w);
    return w;
-#else
-   return efl_gfx_shape_stroke_width_get(obj);
-#endif
 }
 
 EAPI void
 evas_vg_shape_stroke_width_set(Evas_Vg_Shape *obj, double w)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1009,9 +840,7 @@ evas_vg_shape_stroke_width_set(Evas_Vg_Shape *obj, double w)
    sd->width = w;
 
    tvg_shape_set_stroke_width(_get_tvg_shape(obj), sd->scale * sd->width);
-#else
-   efl_gfx_shape_stroke_width_set(obj, w);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
@@ -1019,21 +848,18 @@ EAPI double
 evas_vg_shape_stroke_location_get(Evas_Vg_Shape *obj)
 {
    //TODO: implement
-   return efl_gfx_shape_stroke_location_get(obj);
+   return 0.0;
 }
 
 EAPI void
 evas_vg_shape_stroke_location_set(Evas_Vg_Shape *obj, double centered)
 {
    //TODO: implement
-   efl_gfx_shape_stroke_location_set(obj, centered);
-   efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_stroke_dash_get(Evas_Vg_Shape *obj, const Evas_Vg_Dash **dash, unsigned int *length)
 {
-#ifdef HAVE_THORVG
    if (!dash || !length) return;
 
    const float *dashPattern;
@@ -1054,76 +880,52 @@ evas_vg_shape_stroke_dash_get(Evas_Vg_Shape *obj, const Evas_Vg_Dash **dash, uns
 
    *dash = d;
    *length = cnt / 2;
-#else
-   efl_gfx_shape_stroke_dash_get(obj, (const Efl_Gfx_Dash **)dash, length);
-#endif
 }
 
 EAPI void
 evas_vg_shape_stroke_dash_set(Evas_Vg_Shape *obj, const Evas_Vg_Dash *dash, unsigned int length)
 {
-#ifdef HAVE_THORVG
    _dash_set(obj, dash, length);
-#else
-   efl_gfx_shape_stroke_dash_set(obj, (const Efl_Gfx_Dash *)dash, length);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI Evas_Vg_Cap
 evas_vg_shape_stroke_cap_get(Evas_Vg_Shape *obj)
 {
-#ifdef HAVE_THORVG
    Tvg_Stroke_Cap cap;
    tvg_shape_get_stroke_cap(_get_tvg_shape(obj), &cap);
    return _tvg_to_efl_stroke_cap(cap);
-#else
-   return (Evas_Vg_Cap)efl_gfx_shape_stroke_cap_get(obj);
-#endif
 }
 
 EAPI void
 evas_vg_shape_stroke_cap_set(Evas_Vg_Shape *obj, Evas_Vg_Cap c)
 {
-#ifdef HAVE_THORVG
    tvg_shape_set_stroke_cap(_get_tvg_shape(obj), _efl_to_tvg_stroke_cap(c));
-#else
-   efl_gfx_shape_stroke_cap_set(obj, (Efl_Gfx_Cap)c);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI Evas_Vg_Join
 evas_vg_shape_stroke_join_get(Evas_Vg_Shape *obj)
 {
-#ifdef HAVE_THORVG
    Tvg_Stroke_Join join;
    tvg_shape_get_stroke_join(_get_tvg_shape(obj), &join);
    return _tvg_to_efl_stroke_join(join);
-#else
-   return (Evas_Vg_Join)efl_gfx_shape_stroke_join_get(obj);
-#endif
 }
 
 EAPI void
 evas_vg_shape_stroke_join_set(Evas_Vg_Shape *obj, Evas_Vg_Join j)
 {
-#ifdef HAVE_THORVG
    tvg_shape_set_stroke_join(_get_tvg_shape(obj), _efl_to_tvg_stroke_join(j));
-#else
-   efl_gfx_shape_stroke_join_set(obj, (Efl_Gfx_Join)j);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_fill_rule_set(Evas_Vg_Shape *obj, Evas_Vg_Fill_Rule r)
 {
-#ifdef HAVE_THORVG
    tvg_shape_set_fill_rule(_get_tvg_shape(obj), (Tvg_Stroke_Cap) r);
-#else
-   efl_gfx_shape_fill_rule_set(obj, (Efl_Gfx_Fill_Rule) r);
-#endif
 }
 
 EAPI void
@@ -1137,7 +939,6 @@ evas_vg_shape_path_set(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const
 {
    if (!op || !points) return;
 
-#ifdef HAVE_THORVG
    unsigned int cmd_length = 0;
    unsigned int pts_length = 0;
    unsigned int i = 0, k = 0;
@@ -1174,10 +975,9 @@ evas_vg_shape_path_set(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
    if (!sd) return;
+
    if (pts_length >= 2) _assign_current_point(sd, NULL, points[pts_length - 2], points[pts_length - 1]);
-#else
-   efl_gfx_path_set(obj, (const Efl_Gfx_Path_Command *)op, points);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
@@ -1185,7 +985,7 @@ EAPI void
 evas_vg_shape_path_get(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command **op, const double **points)
 {
    if (!op || !points) return;
-#ifdef HAVE_THORVG
+
    unsigned int i = 0, j = 0;
    Evas_Vg_Path_Command *evas_cmds = NULL;
    double *evas_pts = NULL;
@@ -1228,16 +1028,11 @@ evas_vg_shape_path_get(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command **op, cons
         *points = evas_pts;
      }
    else *points = NULL;
-
-#else
-   efl_gfx_path_get(obj, (const Efl_Gfx_Path_Command **)op, points);
-#endif
 }
 
 EAPI void
 evas_vg_shape_path_length_get(Evas_Vg_Shape *obj, unsigned int *commands, unsigned int *points)
 {
-#ifdef HAVE_THORVG
    Tvg_Paint *tvg_shape = _get_tvg_shape(obj);
    if (!tvg_shape) return;
 
@@ -1253,16 +1048,11 @@ evas_vg_shape_path_length_get(Evas_Vg_Shape *obj, unsigned int *commands, unsign
 
    //evas array stores x, y coordinates in one array, tvg use array of points
    *points = *points * 2;
-
-#else
-   efl_gfx_path_length_get(obj, commands, points);
-#endif
 }
 
 EAPI void
 evas_vg_shape_current_get(Evas_Vg_Shape *obj, double *x, double *y)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
@@ -1272,15 +1062,11 @@ evas_vg_shape_current_get(Evas_Vg_Shape *obj, double *x, double *y)
 
    if (x) *x = sd->curr.x;
    if (y) *y = sd->curr.y;
-#else
-   efl_gfx_path_current_get(obj, x, y);
-#endif
 }
 
 EAPI void
 evas_vg_shape_current_ctrl_get(Evas_Vg_Shape *obj, double *x, double *y)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
@@ -1290,26 +1076,19 @@ evas_vg_shape_current_ctrl_get(Evas_Vg_Shape *obj, double *x, double *y)
 
    if (x) *x = sd->curr_ctrl.x;
    if (y) *y = sd->curr_ctrl.y;
-#else
-   efl_gfx_path_current_ctrl_get(obj, x, y);
-#endif
 }
 
 EAPI void
 evas_vg_shape_dup(Evas_Vg_Shape *obj, Evas_Vg_Shape *dup_from)
 {
-#ifdef HAVE_THORVG
    _shape_dup(obj, dup_from);
-#else
-   efl_gfx_path_copy_from(obj, dup_from);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_reset(Evas_Vg_Shape *obj)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Node_Data* nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
@@ -1323,16 +1102,13 @@ evas_vg_shape_reset(Evas_Vg_Shape *obj)
    sd->start.x = sd->start.y = 0;
 
    tvg_shape_reset(sd->shape);
-#else
-   efl_gfx_path_reset(obj);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_move_to(Evas_Vg_Shape *obj, double x, double y)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1341,16 +1117,13 @@ evas_vg_shape_append_move_to(Evas_Vg_Shape *obj, double x, double y)
    tvg_shape_move_to(sd->shape, x, y);
    _assign_current_point(sd, NULL, x, y);
    sd->cmd_prev = PATH_CMD_TYPE_NO_BEZIER;
-#else
-   efl_gfx_path_append_move_to(obj, x, y);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_line_to(Evas_Vg_Shape *obj, double x, double y)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1359,38 +1132,29 @@ evas_vg_shape_append_line_to(Evas_Vg_Shape *obj, double x, double y)
    tvg_shape_line_to(sd->shape, x, y);
    _assign_current_point(sd, NULL, x, y);
    sd->cmd_prev = PATH_CMD_TYPE_NO_BEZIER;
-#else
-   efl_gfx_path_append_line_to(obj, x, y);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_quadratic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y)
 {
-#ifdef HAVE_THORVG
    _append_quadratic(obj, x, y, ctrl_x, ctrl_y);
-#else
-   efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_squadratic_to(Evas_Vg_Shape *obj, double x, double y)
 {
-#ifdef HAVE_THORVG
    _append_squadratic(obj, x, y);
-#else
-   efl_gfx_path_append_squadratic_to(obj, x, y);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_cubic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1400,40 +1164,29 @@ evas_vg_shape_append_cubic_to(Evas_Vg_Shape *obj, double x, double y, double ctr
    _assign_current_point(sd, NULL, x, y);
    _assign_current_ctrl_point(sd, ctrl_x1, ctrl_y1);
    sd->cmd_prev = PATH_CMD_TYPE_BEZIER_CUBIC;
-#else
-   efl_gfx_path_append_cubic_to(obj, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, x, y);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_scubic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y)
 {
-#ifdef HAVE_THORVG
    _append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
-#else
-   efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_arc_to(Evas_Vg_Shape *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
 {
-#ifdef HAVE_THORVG
    _append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
-#else
-   efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_arc(Evas_Vg_Shape *obj, double x, double y, double w, double h, double start_angle, double sweep_length)
 {
-#ifndef HAVE_THORVG
-   efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length);
-#else
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1464,14 +1217,13 @@ evas_vg_shape_append_arc(Evas_Vg_Shape *obj, double x, double y, double w, doubl
                            pts[i+2].x, pts[i+2].y);
         _assign_current_point(sd, NULL, pts[i+2].x, pts[i+2].y);
      }
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_close(Evas_Vg_Shape *obj)
 {
-#ifdef HAVE_THORVG
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
    if (!sd) return;
 
@@ -1479,16 +1231,13 @@ evas_vg_shape_append_close(Evas_Vg_Shape *obj)
 
    sd->curr.x = sd->start.x;
    sd->curr.y = sd->start.y;
-#else
-   efl_gfx_path_append_close(obj);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_circle(Evas_Vg_Shape *obj, double x, double y, double radius)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1497,16 +1246,13 @@ evas_vg_shape_append_circle(Evas_Vg_Shape *obj, double x, double y, double radiu
    tvg_shape_append_circle(sd->shape, x, y, radius, radius);
    tvg_shape_move_to(sd->shape, x + radius, y);
    _assign_current_point(sd, NULL, x + radius, y);
-#else
-   efl_gfx_path_append_circle(obj, x, y, radius);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_ellipse(Evas_Vg_Shape *obj, double cx, double cy, double rx, double ry)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1515,16 +1261,13 @@ evas_vg_shape_append_ellipse(Evas_Vg_Shape *obj, double cx, double cy, double rx
    tvg_shape_append_circle(sd->shape, cx, cy, rx, ry);
    tvg_shape_move_to(sd->shape, cx + rx, cy);
    _assign_current_point(sd, NULL, cx + rx, cy);
-#else
-   efl_gfx_path_append_arc(obj, cx - rx, cy - ry, 2 * rx, 2 * ry, 0, 360);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_rect(Evas_Vg_Shape *obj, double x, double y, double w, double h, double rx, double ry)
 {
-#ifdef HAVE_THORVG
    if (!obj) return;
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1541,16 +1284,13 @@ evas_vg_shape_append_rect(Evas_Vg_Shape *obj, double x, double y, double w, doub
         _assign_current_point(sd, NULL, x, y + ry);
         tvg_shape_move_to(sd->shape, x, y + h/2);
      }
-#else
-   efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
 EAPI void
 evas_vg_shape_append_svg_path(Evas_Vg_Shape *obj, const char *svg_path_data)
 {
-#ifdef HAVE_THORVG
    #define SVG_PATH_NUM_LEN 7
 
    Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
@@ -1584,9 +1324,7 @@ evas_vg_shape_append_svg_path(Evas_Vg_Shape *obj, const char *svg_path_data)
 
    if (svg_path.cmds) free(svg_path.cmds);
    if (svg_path.pts) free(svg_path.pts);
-#else
-   efl_gfx_path_append_svg_path(obj, svg_path_data);
-#endif
+
    efl_canvas_vg_node_change(obj);
 }
 
@@ -1594,12 +1332,10 @@ EAPI Eina_Bool
 evas_vg_shape_interpolate(Evas_Vg_Shape *obj, const Evas_Vg_Shape *from, const Evas_Vg_Shape *to, double pos_map)
 {
    Eina_Bool ret = EINA_FALSE;
-#ifdef HAVE_THORVG
+
    if (!evas_vg_shape_equal_commands((Evas_Vg_Shape*)from, (Evas_Vg_Shape*)to)) return EINA_FALSE;
    ret = _shape_interpolate(obj, from, to, pos_map);
-#else
-   ret = efl_gfx_path_interpolate(obj, from, to, pos_map);
-#endif
+
    efl_canvas_vg_node_change(obj);
    return ret;
 }
@@ -1607,7 +1343,6 @@ evas_vg_shape_interpolate(Evas_Vg_Shape *obj, const Evas_Vg_Shape *from, const E
 EAPI Eina_Bool
 evas_vg_shape_equal_commands(Evas_Vg_Shape *obj, const Evas_Vg_Shape *with)
 {
-#ifdef HAVE_THORVG
    const Tvg_Path_Command *cmds = NULL;
    const Tvg_Path_Command *cmds_with = NULL;
 
@@ -1628,9 +1363,6 @@ evas_vg_shape_equal_commands(Evas_Vg_Shape *obj, const Evas_Vg_Shape *with)
      }
 
    return EINA_TRUE;
-#else
-   return efl_gfx_path_equal_commands(obj, with);
-#endif
 }
 
 EAPI Efl_Canvas_Vg_Shape*