Add lottie_init() and lottie_shutdown() c api. 48/276748/1
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Fri, 10 Dec 2021 04:30:07 +0000 (13:30 +0900)
committerjykeon <jykeon@samsung.com>
Fri, 24 Jun 2022 02:42:12 +0000 (11:42 +0900)
commitf6931097c040d9ec7d2b4fac4b1cd67f20cc77c7
treeb1ee55aace45ff9091aef5dd6d10d73a84478a63
parentad489494b0eea5c20c4e1267cd639574df53ea1a
Add lottie_init() and lottie_shutdown() c api.

To support dynamic loading and unloading of rlottie library safely
we need to deallocate the resource cache as well as safely shutdown all the
worker threads.
current patch only stops the Render and Rle task schedulers when lottie_shutdown is called.

Things yet to be implemented during shutdown phase
- Unload image loader if loaded dynamically.
- Check if we can release some cache resources.
- Currently multiple load and unload of rlottie library will not work as we are not starting the
  scheduler again when lottie_init() called multiple time in the same process.

Change-Id: Ifacf3882c4aec3ce87e9840d76f445e727a74f58
Signed-off-by: jykeon <jykeon@samsung.com>
inc/rlottie_capi.h
src/binding/c/lottieanimation_capi.cpp
src/lottie/lottieanimation.cpp
src/vector/vraster.cpp