From: Michal Maciola Date: Thu, 28 Oct 2021 11:35:01 +0000 (+0200) Subject: evas vg json: fix invisible layer X-Git-Tag: submit/tizen/20211101.025718^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F265787%2F2;p=platform%2Fupstream%2Fefl.git evas vg json: fix invisible layer This patch fixes the reported rendering bug for particular json files. If the layer was invisible, it was skipped and not rendered, but if it had some masking layer, it was incorrectly applied for previous layer as a parent. This fixes incorrect behaviour by skipping these masking layer. Change-Id: I9015e47b83d479d6ac3e644fcd52551df8836042 --- diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c index 3e4425804f..2f35d8f6ae 100644 --- a/src/static_libs/vg_common/vg_common_json.c +++ b/src/static_libs/vg_common/vg_common_json.c @@ -318,20 +318,23 @@ _update_vg_tree(Tvg_Paint *root, const LOTLayerNode *layer, int depth EINA_UNUSE { LOTLayerNode *clayer = layer->mLayerList.ptr[i]; +#if DEBUG + for (int i = 0; i < depth; i++) printf(" "); + printf("[layer %03d] matte:%d keypath:%s%s\n", i, matte_mode, clayer->keypath, clayer->mVisible?"":" visible:FALSE"); +#endif + if (!clayer->mVisible) { if (ptree && matte_mode != TVG_COMPOSITE_METHOD_NONE) tvg_paint_set_opacity(ptree, 0); matte_mode = TVG_COMPOSITE_METHOD_NONE; mtarget = NULL; + + //If layer has a masking layer, skip it + if (clayer->mMatte != MatteNone) i++; continue; } -#if DEBUG - for (int i = 0; i < depth; i++) printf(" "); - printf("[layer %03d] matte:%d keypath:%s%s\n", i, matte_mode, clayer->keypath, clayer->mVisible?"":" visible:FALSE"); -#endif - //Source Layer Tvg_Paint *ctree = tvg_scene_new(); _update_vg_tree(ctree, clayer, depth+1);