Add lottie_init() and lottie_shutdown() c api. 17/273517/1
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Fri, 10 Dec 2021 04:30:07 +0000 (13:30 +0900)
committerjykeon <jykeon@samsung.com>
Thu, 7 Apr 2022 01:56:29 +0000 (10:56 +0900)
commit23b6da37ddfde37791da2cb818ef2ba3e196b863
treeb1ee55aace45ff9091aef5dd6d10d73a84478a63
parent39f2d1922b466c43cbb65071b7ab5cf93a35bb3a
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