evas vg json: hide parent layer if invisible mask applied 09/269909/3 accepted/tizen/unified/20220316.182839 submit/tizen/20220307.054027 submit/tizen/20220315.013931
authorMichal Maciola <m.maciola@samsung.com>
Fri, 21 Jan 2022 10:09:36 +0000 (11:09 +0100)
committerChun <jykeon@samsung.com>
Fri, 4 Mar 2022 04:22:10 +0000 (04:22 +0000)
If a layer has an invisible mask applied, parent layer will be set
invisible too. It will help displaying some json files correctly.

Change-Id: Ibaacb3f9617eace384eba0e5fa38032ed9ba9ebf

src/static_libs/vg_common/vg_common_json.c

index fc20741..3ffa03b 100644 (file)
@@ -311,12 +311,17 @@ _update_vg_tree(Tvg_Paint *root, const LOTLayerNode *layer, int depth EINA_UNUSE
 
         if (!clayer->mVisible)
           {
+             // TIZEN_ONLY(20220121): Hide parent layer if invisible mask applied
+             if (ptree && matte_mode != TVG_COMPOSITE_METHOD_NONE)
+               tvg_paint_set_opacity(ptree, 0);
+
+             matte_mode = TVG_COMPOSITE_METHOD_NONE;
+
              //If layer has some masking layers, skip them
              while (clayer->mMatte != MatteNone)
                {
                   clayer = layer->mLayerList.ptr[++i];
                }
-             matte_mode = TVG_COMPOSITE_METHOD_NONE;
              continue;
           }