From 26b1aa8f4251079190c51221b0d2505f10cdd62f Mon Sep 17 00:00:00 2001 From: Michal Maciola Date: Wed, 16 Dec 2020 12:29:23 +0100 Subject: [PATCH] evas vector: efl_vanvas_vg_image: added scene pushing in render_pre_tvg Change-Id: I84faac086cf906eead2658475c623f23aefd59c8 --- src/lib/evas/canvas/efl_canvas_vg_image.c | 10 +++++++--- src/lib/evas/canvas/efl_canvas_vg_shape.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_image.c b/src/lib/evas/canvas/efl_canvas_vg_image.c index 64a73b1..222c3b6 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_image.c +++ b/src/lib/evas/canvas/efl_canvas_vg_image.c @@ -97,7 +97,7 @@ _efl_canvas_vg_image_render_pre_tvg(EINA_UNUSED Evas_Object_Protected_Data *vg_p Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd, Eina_Matrix3 *pTransform, - void *canvas) + void *canvas, void *scene) { int alpha; Tvg_Matrix trans_mat = { 0 }; @@ -117,7 +117,11 @@ _efl_canvas_vg_image_render_pre_tvg(EINA_UNUSED Evas_Object_Protected_Data *vg_p printf("Error loading image buffer \n"); return; } - tvg_canvas_push((Tvg_Canvas *) canvas, pd->picture); + + if (scene) + tvg_scene_push(scene, pd->picture); + else if (canvas) + tvg_canvas_push(canvas, pd->picture); } EFL_CANVAS_VG_COMPUTE_MATRIX(cTransform, pTransform, nd); @@ -132,7 +136,7 @@ _efl_canvas_vg_image_render_pre_tvg(EINA_UNUSED Evas_Object_Protected_Data *vg_p efl_gfx_color_get(obj, NULL, NULL, NULL, &alpha); EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, alpha, nd); - // TODO: apply color tvg_shape_set_fill_color + // TODO: apply color tvg_paint_set_opacity(pd->picture, alpha); tvg_canvas_update_paint((Tvg_Canvas *) canvas, pd->picture); diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c index e89074d..fafbf9c 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_shape.c +++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c @@ -720,7 +720,7 @@ _convert_eina_to_tvg_mat(const Eina_Matrix3 *eina_mat, Tvg_Matrix *tvg_mat) } static void -_efl_canvas_vg_shape_render_pre_tvg(Evas_Object_Protected_Data *vg_pd, +_efl_canvas_vg_shape_render_pre_tvg(EINA_UNUSED Evas_Object_Protected_Data *vg_pd, Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd, Eina_Matrix3 *pTransform, -- 2.7.4