summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-04-14 11:38:27 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2020-04-14 11:38:27 +0900
commita18ac99dd62a302d1b98709f5e02e2c4e444f257 (patch)
treefcb43e65d91d1bfc6f5df217541e63fc2508cbef
parent3897603796a74f438167cacc3bba43b76b41d3dd (diff)
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
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c7
1 files changed, 7 insertions, 0 deletions
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,
212 if (flag & EFL_GFX_CHANGE_FLAG_MATRIX) 212 if (flag & EFL_GFX_CHANGE_FLAG_MATRIX)
213 child_nd->flags |= EFL_GFX_CHANGE_FLAG_MATRIX; 213 child_nd->flags |= EFL_GFX_CHANGE_FLAG_MATRIX;
214 214
215 // Note: If Vg.Container has transparency, this is calculated by _evas_vg_render in Efl.Canvas.Vg.Object.
216 // Therefore, there is no need to propagate the transparency of the container to the child.
217 // However, if there is a composition target, the child must refer to the parent's opacity.
218 // Because _evas_vg_render does not support opacity calculation for containers that need to be composited.
219 // These things need to be refactored in a better way later.
220 c_a = !comp ? 255 : c_a;
221
215 _evas_vg_render_pre(vg_pd, child, 222 _evas_vg_render_pre(vg_pd, child,
216 engine, output, context, surface, 223 engine, output, context, surface,
217 ctransform, c_a, comp, comp_method); 224 ctransform, c_a, comp, comp_method);