vg common json: Don't ignore layer opacity. 76/262576/2
authorMichal Szczecinski <m.szczecinsk@partner.samsung.com>
Fri, 13 Aug 2021 09:06:49 +0000 (11:06 +0200)
committerMichal Szczecinski <m.szczecinsk@partner.samsung.com>
Fri, 13 Aug 2021 09:31:44 +0000 (11:31 +0200)
Some lottie files use translucent layers as a mask. We can't ignore
them. This commit pass layer opacity to tree to fix rendering issues in
some lottie files.

Change-Id: I05eb2eb43755c2ca3aa2194daeded76613b4d7d4

src/static_libs/vg_common/vg_common_json.c

index a43c4a2..7664494 100644 (file)
@@ -305,7 +305,6 @@ static void
 _update_vg_tree(Tvg_Paint *root, const LOTLayerNode *layer, int depth EINA_UNUSED)
 {
    if (!layer->mVisible) return;
-   if (layer->mAlpha == 0) return;
 
    Tvg_Paint *ptree = NULL;
 
@@ -314,6 +313,8 @@ _update_vg_tree(Tvg_Paint *root, const LOTLayerNode *layer, int depth EINA_UNUSE
    Tvg_Paint *mtarget = NULL;
    LOTLayerNode *mlayer = NULL;
 
+   tvg_paint_set_opacity(root, layer->mAlpha);
+
    //Is this layer a container layer?
    for (unsigned int i = 0; i < layer->mLayerList.size; i++)
      {