evas vg: inverse masking support when TVG used 22/257422/3
authorMira Grudzinska <m.grudzinska@samsung.com>
Sun, 25 Apr 2021 13:12:12 +0000 (15:12 +0200)
committerHermet Park <chuneon.park@samsung.com>
Thu, 29 Apr 2021 03:40:06 +0000 (12:40 +0900)
When the inverse masking is used the proper composition method
is passed to the TVG function. So far only masking was supprted.

Change-Id: Iee0b769dc6ae5b73ca27ac8fb18f0db54122c13d

src/lib/evas/canvas/efl_canvas_vg_container.c

index 08a8a44..341a953 100644 (file)
@@ -327,6 +327,8 @@ _efl_canvas_vg_container_efl_canvas_vg_node_comp_method_set(Eo *obj,
         //FIX_TVG: currently only matte alpha is supported. Observed crash in thorvg when CLIP_PATH method is used.
         if (method == EFL_GFX_VG_COMPOSITE_METHOD_MATTE_ALPHA)
           tvg_paint_set_composite_method(pd->scene, pd2->scene, TVG_COMPOSITE_METHOD_ALPHA_MASK);
+        else if (method == EFL_GFX_VG_COMPOSITE_METHOD_MATTE_ALPHA_INVERSE)
+          tvg_paint_set_composite_method(pd->scene, pd2->scene, TVG_COMPOSITE_METHOD_INVERSE_ALPHA_MASK);
      }
 
    pd->comp.method = method;