feat(thorvg): use LVGL's malloc/realloc/zalloc/free (#7772)
This commit is contained in:
committed by
GitHub
parent
2bf2ab46ce
commit
fc5c156385
@@ -7,17 +7,17 @@
|
||||
*/
|
||||
void lv_example_lottie_1(void)
|
||||
{
|
||||
extern const uint8_t lv_example_lottie_approve[];
|
||||
extern const size_t lv_example_lottie_approve_size;
|
||||
extern const uint8_t rain[];
|
||||
extern const size_t rain_size;
|
||||
|
||||
lv_obj_t * lottie = lv_lottie_create(lv_screen_active());
|
||||
lv_lottie_set_src_data(lottie, lv_example_lottie_approve, lv_example_lottie_approve_size);
|
||||
lv_lottie_set_src_data(lottie, rain, rain_size);
|
||||
|
||||
#if LV_DRAW_BUF_ALIGN == 4 && LV_DRAW_BUF_STRIDE_ALIGN == 1
|
||||
/*If there are no special requirements, just declare a buffer
|
||||
x4 because the Lottie is rendered in ARGB8888 format*/
|
||||
static uint8_t buf[64 * 64 * 4];
|
||||
lv_lottie_set_buffer(lottie, 64, 64, buf);
|
||||
static uint8_t buf[364 * 364 * 4];
|
||||
lv_lottie_set_buffer(lottie, 364, 364, buf);
|
||||
#else
|
||||
/*For GPUs and special alignment/strid setting use a draw_buf instead*/
|
||||
LV_DRAW_BUF_DEFINE(draw_buf, 64, 64, LV_COLOR_FORMAT_ARGB8888);
|
||||
|
||||
Reference in New Issue
Block a user