Efl.Canvas.Vg.Container : Initialize mask buffer for SUB, INS composition.

Summary:
   If composite method is substract or intersect, buffer needs initialize.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10732
This commit is contained in:
junsu choi 2019-11-25 19:04:30 +09:00 committed by Hermet Park
parent 0f9b749f68
commit b798f9146c
1 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,12 @@ _prepare_comp(Evas_Object_Protected_Data *obj, //vector object
EFL_GFX_COLORSPACE_ARGB8888,
&pd->comp.stride);
if (!pd->comp.pixels) ERR("Failed to map VG composite buffer");
//If composite method is SUBSTRACT or INTERSECT, Buffer needs initialize.
if (pd->comp.pixels &&
(pd->comp.method == EFL_GFX_VG_COMPOSITE_METHOD_MASK_SUBSTRACT ||
pd->comp.method == EFL_GFX_VG_COMPOSITE_METHOD_MASK_INTERSECT))
memset(pd->comp.pixels, init_buffer, pd->comp.length);
}
else
{