mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
chore(lottie) move rlottie_capi.h to lv_rlottie.c (#2902)
fix(lottie) invalidate image src after delete rlottie Signed-off-by: wangxuedong <wangxuedong@xiaomi.com> Change-Id: Ie8ec726663335925ae9f25f2428097c2f948892e
This commit is contained in:
parent
b9b4447369
commit
350e15a12e
@ -9,6 +9,8 @@
|
||||
#include "lv_rlottie.h"
|
||||
#if LV_USE_RLOTTIE
|
||||
|
||||
#include <rlottie_capi.h>
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -170,6 +172,7 @@ static void lv_rlottie_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj
|
||||
rlottie->dest_frame = 0;
|
||||
}
|
||||
|
||||
lv_img_cache_invalidate_src(&rlottie->imgdsc);
|
||||
if(rlottie->allocated_buf) {
|
||||
lv_mem_free(rlottie->allocated_buf);
|
||||
rlottie->allocated_buf = NULL;
|
||||
|
@ -16,8 +16,6 @@ extern "C" {
|
||||
#include "../../../lvgl.h"
|
||||
#if LV_USE_RLOTTIE
|
||||
|
||||
#include <rlottie_capi.h>
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -33,9 +31,11 @@ typedef enum {
|
||||
LV_RLOTTIE_CTRL_LOOP = 8,
|
||||
} lv_rlottie_ctrl_t;
|
||||
|
||||
/** definition in lottieanimation_capi.c */
|
||||
struct Lottie_Animation_S;
|
||||
typedef struct {
|
||||
lv_img_t img_ext;
|
||||
Lottie_Animation * animation;
|
||||
struct Lottie_Animation_S * animation;
|
||||
lv_timer_t * task;
|
||||
lv_img_dsc_t imgdsc;
|
||||
size_t total_frames;
|
||||
|
Loading…
x
Reference in New Issue
Block a user