edje_calc: Add unload file for already loaded vector lottie file.

Summary:
Users can use multiple jsons per description in one part in edc.
At that time, multiple files are loaded,
if a file is already loaded, it must be unloaded.

Test Plan:
edje_cc -beta -id ./ json_edc.edc
make
./test
Push Change button -> shutdown application

{F3882716}

Reviewers: Hermet, herb, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11820
This commit is contained in:
junsu choi 2020-05-13 21:58:17 +09:00 committed by Hermet Park
parent 4dbb78ee9b
commit 6a14507edc
1 changed files with 1 additions and 0 deletions

View File

@ -3243,6 +3243,7 @@ _edje_vector_load_lottie(Edje *ed, Edje_Real_Part *ep, const char *key)
{
lottie_data[lottie_data_len] = '\0';
file = eina_file_virtualize(NULL, lottie_data, lottie_data_len + 1, EINA_FALSE);
if (efl_file_loaded_get(ep->object)) efl_file_unload(ep->object);
efl_file_simple_mmap_load(ep->object, file, NULL);
if (ep->typedata.vector->lottie_virtual_file)