jsuya pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a18ac99dd62a302d1b98709f5e02e2c4e444f257
commit a18ac99dd62a302d1b98709f5e02e2c4e444f257 Author: JunsuChoi <[email protected]> Date: Tue Apr 14 11:38:27 2020 +0900 Efl.Canvas.Vg.Container: Prevent duplicate transpacency calculation. Summary: If Vg.Container has transparency, this is calculated by _evas_vg_render in Efl.Canvas.Vg.Object. Therefore, there is no need to propagate the transparency of the container to the child. _evas_vg_render pre-draws all children and calculates transparency in batches for avoid duplicate calculation. Test Plan: N/A Reviewers: Hermet, kimcinoo, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11692 --- src/lib/evas/canvas/efl_canvas_vg_container.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c index f791f8160a..37b59405c3 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_container.c +++ b/src/lib/evas/canvas/efl_canvas_vg_container.c @@ -212,6 +212,13 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd, if (flag & EFL_GFX_CHANGE_FLAG_MATRIX) child_nd->flags |= EFL_GFX_CHANGE_FLAG_MATRIX; + // Note: If Vg.Container has transparency, this is calculated by _evas_vg_render in Efl.Canvas.Vg.Object. + // Therefore, there is no need to propagate the transparency of the container to the child. + // However, if there is a composition target, the child must refer to the parent's opacity. + // Because _evas_vg_render does not support opacity calculation for containers that need to be composited. + // These things need to be refactored in a better way later. + c_a = !comp ? 255 : c_a; + _evas_vg_render_pre(vg_pd, child, engine, output, context, surface, ctransform, c_a, comp, comp_method); --
