add lottie_configure_model_cache_size() c api accepted/tizen/unified/20210316.151332 submit/tizen/20210315.060811
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Thu, 25 Feb 2021 01:59:33 +0000 (10:59 +0900)
committerHermet Park <chuneon.park@samsung.com>
Mon, 15 Mar 2021 06:05:06 +0000 (15:05 +0900)
Change-Id: I56e51ae7651f9a966d56f70ebb304408d973cfae

inc/rlottie_capi.h
src/binding/c/lottieanimation_capi.cpp

index c54de286eec68eafa6463d714ae5011b9c545bec..7c883fac15da23a9f704644a21af2c8626bcb8c8 100644 (file)
@@ -274,6 +274,23 @@ RLOTTIE_API void lottie_animation_property_override(Lottie_Animation *animation,
  * */
 RLOTTIE_API const LOTMarkerList* lottie_animation_get_markerlist(Lottie_Animation *animation);
 
+/**
+ *  @brief Configures rlottie model cache policy.
+ *
+ *  Provides Library level control to configure model cache
+ *  policy. Setting it to 0 will disable
+ *  the cache as well as flush all the previously cached content.
+ *
+ *  @param[in] cacheSize  Maximum Model Cache size.
+ *
+ *  @note to disable Caching configure with 0 size.
+ *  @note to flush the current Cache content configure it with 0 and
+ *        then reconfigure with the new size.
+ *
+ *  @internal
+ */
+RLOTTIE_API void lottie_configure_model_cache_size(size_t cacheSize);
+
 #ifdef __cplusplus
 }
 #endif
index 2434b5faac7da92690bc0f637b1078b48f102d3b..a54dac513d8c23f62ce96907b98a9fa17f70044e 100644 (file)
@@ -275,4 +275,10 @@ lottie_animation_get_markerlist(Lottie_Animation_S *animation)
    return (const LOTMarkerList*)animation->mMarkerList;
 }
 
+RLOTTIE_API void
+lottie_configure_model_cache_size(size_t cacheSize)
+{
+   rlottie::configureModelCacheSize(cacheSize);
+}
+
 }