fix(draw): make SW render work with any stride and add stride=64 to CI

This commit is contained in:
Gabor Kiss-Vamosi
2023-11-14 22:19:56 +01:00
parent cb44516c59
commit 6cda061c65
5 changed files with 28 additions and 31 deletions

View File

@@ -87,7 +87,7 @@ typedef void * lv_user_data_t;
#undef LV_LOG_PRINTF
/*Use a large value be sure any issues will cause crash*/
//#define LV_DRAW_BUF_STRIDE_ALIGN 64
#define LV_DRAW_BUF_STRIDE_ALIGN 64
/*Use non power of 2 to avoid the case when `malloc` returns aligned pointer by default, and use a large value be sure any issues will cause crash*/
#define LV_DRAW_BUF_ALIGN 852

View File

@@ -153,7 +153,7 @@ static void create_ui(void)
}
/*Large byte array*/
static uint8_t canvas_buf[CANVAS_WIDTH_TO_STRIDE(400, 2) * 100 * 2];
static uint8_t canvas_buf[CANVAS_WIDTH_TO_STRIDE(400, 2) * 100 * 2 + LV_DRAW_BUF_ALIGN];
lv_obj_t * canvas = lv_canvas_create(scr);
lv_obj_set_grid_cell(canvas, LV_GRID_ALIGN_START, 0, 2, LV_GRID_ALIGN_START, 2, 1);