{
Efl_Canvas_Vg_Node_Data *cnd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
if (cnd && cnd->render_pre_tvg)
- cnd->render_pre_tvg(obj, child, cnd, cTransform, canvas, cd->scene, w, h);
+ cnd->render_pre_tvg(obj, child, cnd, cTransform, canvas, cd->scene);
}
}
#endif
#ifdef HAVE_THORVG
static void
_render_to_buffer_tvg(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
- Efl_VG *root, int w, int h)
+ Efl_VG *root, int w EINA_UNUSED, int h EINA_UNUSED)
{
tvg_canvas_clear(pd->tvg_canvas, false);
{
Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(root, EFL_CANVAS_VG_NODE_CLASS);
if (nd && nd->render_pre_tvg && pd)
- nd->render_pre_tvg(obj, root, nd, NULL, pd->tvg_canvas, NULL, w, h);
+ nd->render_pre_tvg(obj, root, nd, NULL, pd->tvg_canvas, NULL);
}
tvg_canvas_update(pd->tvg_canvas);
pd->changed = EINA_TRUE;
}
- if (pd->vg_entry)
+ Vg_Cache_Entry *vg_entry = pd->vg_entry;
+ if (vg_entry)
{
+ if ((size.w != vg_entry->w) || (size.h != vg_entry->h))
+ {
+ vg_entry = evas_cache_vg_entry_resize(vg_entry, size.w, size.h);
+ evas_cache_vg_entry_del(pd->vg_entry);
+ pd->vg_entry = vg_entry;
+ }
+
Efl_VG *root = evas_cache_vg_tree_get(pd->vg_entry, pd->frame_idx);
if (!root) return;
_render_to_buffer_tvg(obj, pd, root,
- pd->vg_entry->w,
- pd->vg_entry->h);
+ vg_entry->w,
+ vg_entry->h);
}
if (pd->user_entry && pd->user_entry->root)
Efl_VG *obj,
Efl_Canvas_Vg_Node_Data *nd,
Eina_Matrix3 *pTransform,
- void *canvas, void *scene, int w, int h)
+ void *canvas, void *scene)
{
Efl_Canvas_Vg_Shape_Data *sd = NULL;
double scale_x = 1.0;
double scale_y = 1.0;
- if (!nd || !nd->data || w == 0 || h == 0) return;
+ if (!nd || !nd->data) return;
+ nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
sd = nd->data;
EFL_CANVAS_VG_COMPUTE_MATRIX(cTransform, pTransform, nd);
-
- if (vg_pd && vg_pd->cur)
- {
- if (w != vg_pd->cur->geometry.w || h != vg_pd->cur->geometry.h)
- {
- scale_x = vg_pd->cur->geometry.w / (double) w;
- scale_y = vg_pd->cur->geometry.h / (double) h;
- if (cTransform) eina_matrix3_scale(cTransform, scale_x, scale_y);
- }
- }
-
- nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
tvg_paint_translate(sd->shape, nd->x, nd->y);
-
- if (sd->fill == NULL)
- {
- efl_gfx_color_get(obj, &r, &g, &b, &a);
- tvg_shape_set_fill_color(sd->shape, r, g, b, a);
- }
-
if (cTransform)
{
_convert_eina_to_tvg_mat(cTransform, &trans_mat);
tvg_paint_transform(sd->shape, &trans_mat);
}
+ if (sd->fill == NULL)
+ {
+ efl_gfx_color_get(obj, &r, &g, &b, &a);
+ tvg_shape_set_fill_color(sd->shape, r, g, b, a);
+ }
+
if (scene)
tvg_scene_push(scene, sd->shape);
else if (canvas)
Eina_Matrix3 *ptransform, int opacity, Ector_Buffer *comp, Efl_Gfx_Vg_Composite_Method comp_method, void *data);
#ifdef HAVE_THORVG
- void (*render_pre_tvg)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node, Efl_Canvas_Vg_Node_Data *nd, Eina_Matrix3 *ptransform, void *canvas, void *scene, int w, int h);
+ void (*render_pre_tvg)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node, Efl_Canvas_Vg_Node_Data *nd, Eina_Matrix3 *ptransform, void *canvas, void *scene);
void (*render_tvg)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node, Efl_Canvas_Vg_Node_Data *nd, void *canvas);
#endif