forked from enlightenment/efl
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
This commit is contained in:
parent
3897603796
commit
a18ac99dd6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue