Lines Matching refs:gifobj
59 lv_gif_t * gifobj = (lv_gif_t *) obj; in lv_gif_set_src() local
62 if(gifobj->gif) { in lv_gif_set_src()
63 lv_img_cache_invalidate_src(&gifobj->imgdsc); in lv_gif_set_src()
64 gd_close_gif(gifobj->gif); in lv_gif_set_src()
65 gifobj->gif = NULL; in lv_gif_set_src()
66 gifobj->imgdsc.data = NULL; in lv_gif_set_src()
71 gifobj->gif = gd_open_gif_data(img_dsc->data); in lv_gif_set_src()
74 gifobj->gif = gd_open_gif_file(src); in lv_gif_set_src()
76 if(gifobj->gif == NULL) { in lv_gif_set_src()
81 gifobj->imgdsc.data = gifobj->gif->canvas; in lv_gif_set_src()
82 gifobj->imgdsc.header.always_zero = 0; in lv_gif_set_src()
83 gifobj->imgdsc.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA; in lv_gif_set_src()
84 gifobj->imgdsc.header.h = gifobj->gif->height; in lv_gif_set_src()
85 gifobj->imgdsc.header.w = gifobj->gif->width; in lv_gif_set_src()
86 gifobj->last_call = lv_tick_get(); in lv_gif_set_src()
88 lv_img_set_src(obj, &gifobj->imgdsc); in lv_gif_set_src()
90 lv_timer_resume(gifobj->timer); in lv_gif_set_src()
91 lv_timer_reset(gifobj->timer); in lv_gif_set_src()
93 next_frame_task_cb(gifobj->timer); in lv_gif_set_src()
99 lv_gif_t * gifobj = (lv_gif_t *) obj; in lv_gif_restart() local
100 gd_rewind(gifobj->gif); in lv_gif_restart()
101 lv_timer_resume(gifobj->timer); in lv_gif_restart()
102 lv_timer_reset(gifobj->timer); in lv_gif_restart()
113 lv_gif_t * gifobj = (lv_gif_t *) obj; in lv_gif_constructor() local
115 gifobj->gif = NULL; in lv_gif_constructor()
116 gifobj->timer = lv_timer_create(next_frame_task_cb, 10, obj); in lv_gif_constructor()
117 lv_timer_pause(gifobj->timer); in lv_gif_constructor()
123 lv_gif_t * gifobj = (lv_gif_t *) obj; in lv_gif_destructor() local
124 lv_img_cache_invalidate_src(&gifobj->imgdsc); in lv_gif_destructor()
125 if(gifobj->gif) in lv_gif_destructor()
126 gd_close_gif(gifobj->gif); in lv_gif_destructor()
127 lv_timer_del(gifobj->timer); in lv_gif_destructor()
133 lv_gif_t * gifobj = (lv_gif_t *) obj; in next_frame_task_cb() local
134 uint32_t elaps = lv_tick_elaps(gifobj->last_call); in next_frame_task_cb()
135 if(elaps < gifobj->gif->gce.delay * 10) return; in next_frame_task_cb()
137 gifobj->last_call = lv_tick_get(); in next_frame_task_cb()
139 int has_next = gd_get_frame(gifobj->gif); in next_frame_task_cb()
147 gd_render_frame(gifobj->gif, (uint8_t *)gifobj->imgdsc.data); in next_frame_task_cb()