mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
chore(image_decoder): remove unused codes (#5393)
This commit is contained in:
parent
24115615bc
commit
c0d2e094cc
@ -99,7 +99,6 @@ typedef struct _lv_global_t {
|
||||
|
||||
#if LV_CACHE_DEF_SIZE > 0
|
||||
lv_cache_t * img_cache;
|
||||
size_t cache_builtin_max_size;
|
||||
#endif
|
||||
|
||||
lv_draw_global_info_t draw_info;
|
||||
|
@ -117,14 +117,7 @@ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src
|
||||
dsc->src_type = src_type;
|
||||
|
||||
if(dsc->src_type == LV_IMAGE_SRC_FILE) {
|
||||
size_t fnlen = lv_strlen(src);
|
||||
dsc->src = lv_malloc(fnlen + 1);
|
||||
LV_ASSERT_MALLOC(dsc->src);
|
||||
if(dsc->src == NULL) {
|
||||
LV_LOG_WARN("Out of memory");
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
lv_strcpy((char *)dsc->src, src);
|
||||
dsc->src = lv_strdup(src);
|
||||
}
|
||||
else {
|
||||
dsc->src = src;
|
||||
@ -133,7 +126,6 @@ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src
|
||||
lv_result_t res = LV_RESULT_INVALID;
|
||||
|
||||
lv_image_decoder_t * decoder;
|
||||
lv_image_decoder_args_t * args_copy = NULL;
|
||||
|
||||
static const lv_image_decoder_args_t def_args = {
|
||||
.stride_align = LV_DRAW_BUF_STRIDE_ALIGN != 1,
|
||||
@ -181,8 +173,6 @@ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src
|
||||
if(dsc->src_type == LV_IMAGE_SRC_FILE)
|
||||
lv_free((void *)dsc->src);
|
||||
|
||||
if(args_copy) lv_free(args_copy);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user