Lines Matching refs:rlottie

88     lv_rlottie_t * rlottie = (lv_rlottie_t *) obj;  in lv_rlottie_set_play_mode()  local
89 rlottie->play_ctrl = ctrl; in lv_rlottie_set_play_mode()
91 if(rlottie->task && (rlottie->dest_frame != rlottie->current_frame || in lv_rlottie_set_play_mode()
92 (rlottie->play_ctrl & LV_RLOTTIE_CTRL_PAUSE) == LV_RLOTTIE_CTRL_PLAY)) { in lv_rlottie_set_play_mode()
93 lv_timer_resume(rlottie->task); in lv_rlottie_set_play_mode()
99 lv_rlottie_t * rlottie = (lv_rlottie_t *) obj; in lv_rlottie_set_current_frame() local
100rlottie->current_frame = goto_frame < rlottie->total_frames ? goto_frame : rlottie->total_frames -… in lv_rlottie_set_current_frame()
110 lv_rlottie_t * rlottie = (lv_rlottie_t *) obj; in lv_rlottie_constructor() local
113rlottie->animation = lottie_animation_from_data(rlottie_desc_create, rlottie_desc_create, ""); in lv_rlottie_constructor()
116 rlottie->animation = lottie_animation_from_file(path_create); in lv_rlottie_constructor()
118 if(rlottie->animation == NULL) { in lv_rlottie_constructor()
123 rlottie->total_frames = lottie_animation_get_totalframe(rlottie->animation); in lv_rlottie_constructor()
124 rlottie->framerate = (size_t)lottie_animation_get_framerate(rlottie->animation); in lv_rlottie_constructor()
125 rlottie->current_frame = 0; in lv_rlottie_constructor()
127 rlottie->scanline_width = create_width * LV_ARGB32 / 8; in lv_rlottie_constructor()
130 rlottie->allocated_buf = lv_mem_alloc(allocaled_buf_size); in lv_rlottie_constructor()
131 if(rlottie->allocated_buf != NULL) { in lv_rlottie_constructor()
132 rlottie->allocated_buffer_size = allocaled_buf_size; in lv_rlottie_constructor()
133 memset(rlottie->allocated_buf, 0, allocaled_buf_size); in lv_rlottie_constructor()
136 rlottie->imgdsc.header.always_zero = 0; in lv_rlottie_constructor()
137 rlottie->imgdsc.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA; in lv_rlottie_constructor()
138 rlottie->imgdsc.header.h = create_height; in lv_rlottie_constructor()
139 rlottie->imgdsc.header.w = create_width; in lv_rlottie_constructor()
140 rlottie->imgdsc.data = (void *)rlottie->allocated_buf; in lv_rlottie_constructor()
141 rlottie->imgdsc.data_size = allocaled_buf_size; in lv_rlottie_constructor()
143 lv_img_set_src(obj, &rlottie->imgdsc); in lv_rlottie_constructor()
145 rlottie->play_ctrl = LV_RLOTTIE_CTRL_FORWARD | LV_RLOTTIE_CTRL_PLAY | LV_RLOTTIE_CTRL_LOOP; in lv_rlottie_constructor()
146rlottie->dest_frame = rlottie->total_frames; /* invalid destination frame so it's possible to paus… in lv_rlottie_constructor()
148 rlottie->task = lv_timer_create(next_frame_task_cb, 1000 / rlottie->framerate, obj); in lv_rlottie_constructor()
156 lv_rlottie_t * rlottie = (lv_rlottie_t *) obj; in lv_rlottie_destructor() local
158 if(rlottie->animation) { in lv_rlottie_destructor()
159 lottie_animation_destroy(rlottie->animation); in lv_rlottie_destructor()
160 rlottie->animation = 0; in lv_rlottie_destructor()
161 rlottie->current_frame = 0; in lv_rlottie_destructor()
162 rlottie->framerate = 0; in lv_rlottie_destructor()
163 rlottie->scanline_width = 0; in lv_rlottie_destructor()
164 rlottie->total_frames = 0; in lv_rlottie_destructor()
167 if(rlottie->task) { in lv_rlottie_destructor()
168 lv_timer_del(rlottie->task); in lv_rlottie_destructor()
169 rlottie->task = NULL; in lv_rlottie_destructor()
170 rlottie->play_ctrl = LV_RLOTTIE_CTRL_FORWARD; in lv_rlottie_destructor()
171 rlottie->dest_frame = 0; in lv_rlottie_destructor()
174 lv_img_cache_invalidate_src(&rlottie->imgdsc); in lv_rlottie_destructor()
175 if(rlottie->allocated_buf) { in lv_rlottie_destructor()
176 lv_mem_free(rlottie->allocated_buf); in lv_rlottie_destructor()
177 rlottie->allocated_buf = NULL; in lv_rlottie_destructor()
178 rlottie->allocated_buffer_size = 0; in lv_rlottie_destructor()
228 lv_rlottie_t * rlottie = (lv_rlottie_t *) obj; in next_frame_task_cb() local
230 if((rlottie->play_ctrl & LV_RLOTTIE_CTRL_PAUSE) == LV_RLOTTIE_CTRL_PAUSE) { in next_frame_task_cb()
231 if(rlottie->current_frame == rlottie->dest_frame) { in next_frame_task_cb()
236 rlottie->dest_frame = rlottie->current_frame; in next_frame_task_cb()
239 if((rlottie->play_ctrl & LV_RLOTTIE_CTRL_BACKWARD) == LV_RLOTTIE_CTRL_BACKWARD) { in next_frame_task_cb()
240 if(rlottie->current_frame > 0) in next_frame_task_cb()
241 --rlottie->current_frame; in next_frame_task_cb()
243 if((rlottie->play_ctrl & LV_RLOTTIE_CTRL_LOOP) == LV_RLOTTIE_CTRL_LOOP) in next_frame_task_cb()
244 rlottie->current_frame = rlottie->total_frames - 1; in next_frame_task_cb()
253 if(rlottie->current_frame < rlottie->total_frames) in next_frame_task_cb()
254 ++rlottie->current_frame; in next_frame_task_cb()
256 if((rlottie->play_ctrl & LV_RLOTTIE_CTRL_LOOP) == LV_RLOTTIE_CTRL_LOOP) in next_frame_task_cb()
257 rlottie->current_frame = 0; in next_frame_task_cb()
268 rlottie->animation, in next_frame_task_cb()
269 rlottie->current_frame, in next_frame_task_cb()
270 rlottie->allocated_buf, in next_frame_task_cb()
271 rlottie->imgdsc.header.w, in next_frame_task_cb()
272 rlottie->imgdsc.header.h, in next_frame_task_cb()
273 rlottie->scanline_width in next_frame_task_cb()
277 convert_to_rgba5658(rlottie->allocated_buf, rlottie->imgdsc.header.w, rlottie->imgdsc.header.h); in next_frame_task_cb()