Open simonchen007 opened 3 years ago
Hi, I think it'd be better to add a similar pattern than in lvgl. It allows platform-independent configuration. If not defined, we can use malloc/free
.
What do you think?
Hi, I think it'd be better to add a similar pattern than in lvgl. It allows platform-independent configuration. If not defined, we can use
malloc/free
.What do you think?
Your suggestion is good if add pattern in lvgl_conf.h but need to separate it with the LVGL malloc/free. Because we found, once we use PSRAM gobally, the LVGL would goes slower. So, we need LVGL use IRAM, but lib_png use PSRAM only.
I meant adding similar defines for PNG. E.g.
#define LV_PNG_MALLOC_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
#define LV_PNG_ALLOC malloc /*Wrapper to malloc*/
#define LV_PNG_FREE free /*Wrapper to free*/
That should be nice. But lv_lib_png need to be change too.
I meant adding similar defines for PNG. E.g.
#define LV_PNG_MALLOC_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/ #define LV_PNG_ALLOC malloc /*Wrapper to malloc*/ #define LV_PNG_FREE free /*Wrapper to free*/
But lv_lib_png need to be change too.
Yes, that's why we have this PR :smile: Or how do you mean it?
But lv_lib_png need to be change too.
Yes, that's why we have this PR smile Or how do you mean it?
I'm agree with you.
Can you update the PR accordingly?
Can you update the PR accordingly?
To the LVGL main repo ?
I mean only here by using LV_PNG_MALLOC_INCLUDE/MALLOC/FREE
I meant adding similar defines for PNG. E.g.
#define LV_PNG_MALLOC_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/ #define LV_PNG_ALLOC malloc /*Wrapper to malloc*/ #define LV_PNG_FREE free /*Wrapper to free*/
should we replace malloc,free,realloc with lv_mem_alloc,lv_mem_realloc,lv_mem_free?
This repo was just merged into the lvgl repo. See https://github.com/lvgl/lvgl/tree/master/src/extra/libs/png Please open a new issue there to see how these configs fit into lvgl.