|
@@ -24,7 +24,7 @@ extern void ui_mem_res_free(void * ptr);
|
|
|
extern void * ui_mem_res_alloc(size_t size);
|
|
|
#endif
|
|
|
|
|
|
-static uint8_t *photo_data_buff;
|
|
|
+static uint8_t *photo_data_buff = NULL;
|
|
|
static lv_img_dsc_t *img_dsc;
|
|
|
|
|
|
typedef struct
|
|
@@ -105,8 +105,12 @@ static lv_obj_t *aem_profile_photo_arc_show_create(lv_obj_t *par)
|
|
|
|
|
|
if ((photo_data_size > 0) && (photo_data_size <= PHOTO_DATA_MAX_SIZE)) //>0且≤360*360*3
|
|
|
{
|
|
|
- photo_data_buff = (uint8_t *)ui_mem_res_alloc(photo_data_size);
|
|
|
+ lvgl_res_clear_decoder_cache();
|
|
|
|
|
|
+ if (photo_data_buff == NULL)
|
|
|
+ {
|
|
|
+ photo_data_buff = (uint8_t *)ui_mem_res_alloc(photo_data_size);
|
|
|
+ }
|
|
|
flash_read("profile_photo_name", 3, photo_data_buff, photo_data_size);
|
|
|
//struct fs_file_t file = {0};
|
|
|
|